@Test public void testQueryResultsSet() { Comparator<Dataset> comparator = new Comparator<Dataset>() { @Override public int compare(Dataset arg0, Dataset arg1) { try { return arg0.get("column").compareTo(arg1.get("column")); } catch (ColumnNotFoundException e) { return 0; } } }; QueryResultsSet res = new QueryResultsSet(comparator); assertEquals(0, res.size()); assertTrue(res.isEmpty()); assertFalse(res.iterator().hasNext()); res = new QueryResultsSet(comparator, new MockQueryResults(new MockDataset(), new MockDataset(), new MockDataset("ds", "column", "value2"))); assertEquals(2, res.size()); }
public QueryResultsSet(Comparator<Dataset> comparator) { this.comparator = comparator; }
QueryResultsSet implements QueryResults { public QueryResultsSet(Comparator<Dataset> comparator) { this.comparator = comparator; } }
QueryResultsSet implements QueryResults { public QueryResultsSet(Comparator<Dataset> comparator) { this.comparator = comparator; } QueryResultsSet(Comparator<Dataset> comparator);  QueryResultsSet(Comparator<Dataset> comparator, QueryResults queryResults); }
QueryResultsSet implements QueryResults { public QueryResultsSet(Comparator<Dataset> comparator) { this.comparator = comparator; } QueryResultsSet(Comparator<Dataset> comparator);  QueryResultsSet(Comparator<Dataset> comparator, QueryResults queryResults); void add(Dataset dataset); void addAll(QueryResults queryResults); @Override int size(); @Override Iterator<Dataset> iterator(); @Override boolean isEmpty(); }
QueryResultsSet implements QueryResults { public QueryResultsSet(Comparator<Dataset> comparator) { this.comparator = comparator; } QueryResultsSet(Comparator<Dataset> comparator);  QueryResultsSet(Comparator<Dataset> comparator, QueryResults queryResults); void add(Dataset dataset); void addAll(QueryResults queryResults); @Override int size(); @Override Iterator<Dataset> iterator(); @Override boolean isEmpty();  }