1 package org.simantics.workbench.search;
3 import java.util.ArrayList;
10 * @author Marko Luukkainen
12 public class SearchResult {
14 public List<SearchResultColumn> columns;
15 public List<SearchResultRow> rows;
17 public SearchResult() {
18 columns = new ArrayList<SearchResultColumn>();
19 rows = new ArrayList<SearchResultRow>();
22 public SearchResult(List<SearchResultColumn> columns) {
23 this.columns = columns;
24 rows = new ArrayList<SearchResultRow>();
27 public void addColumn(SearchResultColumn column) {
31 public void addRow(SearchResultRow row) {
35 public List<SearchResultColumn> getColumns() {
39 public List<SearchResultRow> getRows() {
43 public int columnCount() {
44 return columns.size();
47 public int rowCount() {
51 public SearchResult subset(int start, int end) {
52 SearchResult copy = new SearchResult(columns);
53 copy.rows = rows.subList(start, end);
57 public boolean isEmpty() {
58 return rows.isEmpty();