test_class.file: code/src/test/java/com/googlecode/cqengine/resultset/filter/DeduplicatingResultSetTest.java
test_class.identifier: DeduplicatingResultSetTest
test_case.body: @Test
      public void testDeduplicatingResultSet() {
          Collection<Car> cars = CarFactory.createCollectionOfCars(10);
  
          DeduplicatingResultSet<Car, String> deduplicatingResultSet = new DeduplicatingResultSet<Car, String>(
                  Car.MANUFACTURER,
                  new StoredSetBasedResultSet<Car>(new LinkedHashSet<Car>(cars)),
                  QueryFactory.all(Car.class), QueryFactory.noQueryOptions()
          );
          List<Integer> carIdsReturned = new ArrayList<Integer>();
          IndexedCollectionFunctionalTest.extractCarIds(deduplicatingResultSet, carIdsReturned);
  
          // Should return the first distinct Manufacturer...
          Assert.assertEquals(4, deduplicatingResultSet.size());
          Assert.assertEquals(0, deduplicatingResultSet.getRetrievalCost());
          Assert.assertEquals(10, deduplicatingResultSet.getMergeCost());
          Assert.assertEquals(4, carIdsReturned.size());
          Assert.assertEquals(0, carIdsReturned.get(0).intValue());
          Assert.assertEquals(3, carIdsReturned.get(1).intValue());
          Assert.assertEquals(6, carIdsReturned.get(2).intValue());
          Assert.assertEquals(9, carIdsReturned.get(3).intValue());
  
          Assert.assertTrue(deduplicatingResultSet.contains(CarFactory.createCar(0)));
          Assert.assertTrue(deduplicatingResultSet.contains(CarFactory.createCar(3)));
          Assert.assertTrue(deduplicatingResultSet.contains(CarFactory.createCar(6)));
          Assert.assertTrue(deduplicatingResultSet.contains(CarFactory.createCar(9)));
          Assert.assertFalse(deduplicatingResultSet.contains(CarFactory.createCar(1)));
  
          deduplicatingResultSet.close(); // No op.
      }
test_case.class_method_signature: DeduplicatingResultSetTest.testDeduplicatingResultSet()
test_case.full_signature: @Test public void testDeduplicatingResultSet()
test_case.identifier: testDeduplicatingResultSet
test_case.invocations: createCollectionOfCars all noQueryOptions extractCarIds assertEquals size assertEquals getRetrievalCost assertEquals getMergeCost assertEquals size assertEquals intValue get assertEquals intValue get assertEquals intValue get assertEquals intValue get assertTrue contains createCar assertTrue contains createCar assertTrue contains createCar assertTrue contains createCar assertFalse contains createCar close
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeduplicatingResultSet()
focal_class.declarator: wrappedResultSet
focal_class.modifier: final
focal_class.original_string: final ResultSet<O> wrappedResultSet;
focal_class.type: ResultSet<O>
focal_class.var_name: wrappedResultSet
focal_class.declarator: uniqueAttribute
focal_class.modifier: final
focal_class.original_string: final Attribute<O, A> uniqueAttribute;
focal_class.type: Attribute<O, A>
focal_class.var_name: uniqueAttribute
focal_class.declarator: query
focal_class.modifier: final
focal_class.original_string: final Query<O> query;
focal_class.type: Query<O>
focal_class.var_name: query
focal_class.declarator: queryOptions
focal_class.modifier: final
focal_class.original_string: final QueryOptions queryOptions;
focal_class.type: QueryOptions
focal_class.var_name: queryOptions
focal_class.file: code/src/main/java/com/googlecode/cqengine/resultset/filter/DeduplicatingResultSet.java
focal_class.identifier: DeduplicatingResultSet
focal_class.class_method_signature: DeduplicatingResultSet.DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_class.full_signature: public  DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_class.identifier: DeduplicatingResultSet
focal_class.modifiers: public
focal_class.parameters: (Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_class.signature:  DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_class.class_method_signature: DeduplicatingResultSet.iterator()
focal_class.full_signature: @Override public Iterator<O> iterator()
focal_class.identifier: iterator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Iterator<O>
focal_class.signature: Iterator<O> iterator()
focal_class.class_method_signature: DeduplicatingResultSet.contains(O object)
focal_class.full_signature: @Override public final boolean contains(O object)
focal_class.identifier: contains
focal_class.modifiers: @Override public final
focal_class.parameters: (O object)
focal_class.return: boolean
focal_class.signature: boolean contains(O object)
focal_class.class_method_signature: DeduplicatingResultSet.matches(O object)
focal_class.full_signature: @Override public boolean matches(O object)
focal_class.identifier: matches
focal_class.modifiers: @Override public
focal_class.parameters: (O object)
focal_class.return: boolean
focal_class.signature: boolean matches(O object)
focal_class.class_method_signature: DeduplicatingResultSet.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: DeduplicatingResultSet.getRetrievalCost()
focal_class.full_signature: @Override public int getRetrievalCost()
focal_class.identifier: getRetrievalCost
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRetrievalCost()
focal_class.class_method_signature: DeduplicatingResultSet.getMergeCost()
focal_class.full_signature: @Override public int getMergeCost()
focal_class.identifier: getMergeCost
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMergeCost()
focal_class.class_method_signature: DeduplicatingResultSet.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: DeduplicatingResultSet.getQuery()
focal_class.full_signature: @Override public Query<O> getQuery()
focal_class.identifier: getQuery
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Query<O>
focal_class.signature: Query<O> getQuery()
focal_class.class_method_signature: DeduplicatingResultSet.getQueryOptions()
focal_class.full_signature: @Override public QueryOptions getQueryOptions()
focal_class.identifier: getQueryOptions
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: QueryOptions
focal_class.signature: QueryOptions getQueryOptions()
focal_class.superclass: extends ResultSet<O>
focal_method.body: public DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions) {
          this.uniqueAttribute = uniqueAttribute;
          this.wrappedResultSet = wrappedResultSet;
          this.query = query;
          this.queryOptions = queryOptions;
      }
focal_method.class_method_signature: DeduplicatingResultSet.DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_method.full_signature: public  DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_method.identifier: DeduplicatingResultSet
focal_method.modifiers: public
focal_method.parameters: (Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)
focal_method.signature:  DeduplicatingResultSet(Attribute<O, A> uniqueAttribute, ResultSet<O> wrappedResultSet, Query<O> query, QueryOptions queryOptions)