test_class.file: code/src/test/java/com/googlecode/cqengine/metadata/AttributeMetadataTest.java
test_class.identifier: AttributeMetadataTest
test_case.body: @Test
      public void testGetCountOfDistinctKeys() {
          IndexedCollection<Car> cars = createIndexedCollectionOfCars(20); // the 20 cars will contain 4 distinct manufacturers
  
          // Add an unsorted index on Car.MANUFACTURER (a HashIndex)...
          cars.addIndex(HashIndex.onAttribute(Car.MANUFACTURER));
          MetadataEngine<Car> metadataEngine = cars.getMetadataEngine();
  
          // Count the distinct manufacturers...
          AttributeMetadata<String, Car> attributeMetadata = metadataEngine.getAttributeMetadata(Car.MANUFACTURER);
          assertEquals(Integer.valueOf(4), attributeMetadata.getCountOfDistinctKeys());
      }
test_case.class_method_signature: AttributeMetadataTest.testGetCountOfDistinctKeys()
test_case.full_signature: @Test public void testGetCountOfDistinctKeys()
test_case.identifier: testGetCountOfDistinctKeys
test_case.invocations: createIndexedCollectionOfCars addIndex onAttribute getMetadataEngine getAttributeMetadata assertEquals valueOf getCountOfDistinctKeys
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetCountOfDistinctKeys()
focal_class.declarator: index
focal_class.modifier: private final
focal_class.original_string: private final KeyStatisticsIndex<A, O> index;
focal_class.type: KeyStatisticsIndex<A, O>
focal_class.var_name: index
focal_class.declarator: openResourcesHandler
focal_class.modifier: private final
focal_class.original_string: private final Supplier<QueryOptions> openResourcesHandler;
focal_class.type: Supplier<QueryOptions>
focal_class.var_name: openResourcesHandler
focal_class.declarator: closeResourcesHandler
focal_class.modifier: private final
focal_class.original_string: private final Consumer<QueryOptions> closeResourcesHandler;
focal_class.type: Consumer<QueryOptions>
focal_class.var_name: closeResourcesHandler
focal_class.file: code/src/main/java/com/googlecode/cqengine/metadata/AttributeMetadata.java
focal_class.identifier: AttributeMetadata
focal_class.class_method_signature: AttributeMetadata.AttributeMetadata(KeyStatisticsIndex<A, O> index, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.full_signature:   AttributeMetadata(KeyStatisticsIndex<A, O> index, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.identifier: AttributeMetadata
focal_class.parameters: (KeyStatisticsIndex<A, O> index, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.signature:  AttributeMetadata(KeyStatisticsIndex<A, O> index, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.class_method_signature: AttributeMetadata.getFrequencyDistribution()
focal_class.full_signature: public Stream<KeyFrequency<A>> getFrequencyDistribution()
focal_class.identifier: getFrequencyDistribution
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<KeyFrequency<A>>
focal_class.signature: Stream<KeyFrequency<A>> getFrequencyDistribution()
focal_class.class_method_signature: AttributeMetadata.getDistinctKeys()
focal_class.full_signature: public Stream<A> getDistinctKeys()
focal_class.identifier: getDistinctKeys
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<A>
focal_class.signature: Stream<A> getDistinctKeys()
focal_class.class_method_signature: AttributeMetadata.getCountOfDistinctKeys()
focal_class.full_signature: public Integer getCountOfDistinctKeys()
focal_class.identifier: getCountOfDistinctKeys
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Integer
focal_class.signature: Integer getCountOfDistinctKeys()
focal_class.class_method_signature: AttributeMetadata.getCountForKey(A key)
focal_class.full_signature: public Integer getCountForKey(A key)
focal_class.identifier: getCountForKey
focal_class.modifiers: public
focal_class.parameters: (A key)
focal_class.return: Integer
focal_class.signature: Integer getCountForKey(A key)
focal_class.class_method_signature: AttributeMetadata.getKeysAndValues()
focal_class.full_signature: public Stream<KeyValue<A, O>> getKeysAndValues()
focal_class.identifier: getKeysAndValues
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<KeyValue<A, O>>
focal_class.signature: Stream<KeyValue<A, O>> getKeysAndValues()
focal_class.class_method_signature: AttributeMetadata.asKeyFrequencyStream(QueryOptions queryOptions, CloseableIterable<KeyStatistics<A>> iterable)
focal_class.full_signature: @SuppressWarnings("unchecked") protected Stream<KeyFrequency<A>> asKeyFrequencyStream(QueryOptions queryOptions, CloseableIterable<KeyStatistics<A>> iterable)
focal_class.identifier: asKeyFrequencyStream
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (QueryOptions queryOptions, CloseableIterable<KeyStatistics<A>> iterable)
focal_class.return: Stream<KeyFrequency<A>>
focal_class.signature: Stream<KeyFrequency<A>> asKeyFrequencyStream(QueryOptions queryOptions, CloseableIterable<KeyStatistics<A>> iterable)
focal_class.class_method_signature: AttributeMetadata.asStream(QueryOptions queryOptions, CloseableIterable<T> iterable)
focal_class.full_signature: protected Stream<T> asStream(QueryOptions queryOptions, CloseableIterable<T> iterable)
focal_class.identifier: asStream
focal_class.modifiers: protected
focal_class.parameters: (QueryOptions queryOptions, CloseableIterable<T> iterable)
focal_class.return: Stream<T>
focal_class.signature: Stream<T> asStream(QueryOptions queryOptions, CloseableIterable<T> iterable)
focal_class.class_method_signature: AttributeMetadata.openResources()
focal_class.full_signature: protected QueryOptions openResources()
focal_class.identifier: openResources
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: QueryOptions
focal_class.signature: QueryOptions openResources()
focal_class.class_method_signature: AttributeMetadata.closeResources(QueryOptions queryOptions)
focal_class.full_signature: protected void closeResources(QueryOptions queryOptions)
focal_class.identifier: closeResources
focal_class.modifiers: protected
focal_class.parameters: (QueryOptions queryOptions)
focal_class.return: void
focal_class.signature: void closeResources(QueryOptions queryOptions)
focal_method.body: public Integer getCountOfDistinctKeys() {
          QueryOptions queryOptions = openResources();
          try {
              return index.getCountOfDistinctKeys(queryOptions);
          }
          finally {
              closeResources(queryOptions);
          }
      }
focal_method.class_method_signature: AttributeMetadata.getCountOfDistinctKeys()
focal_method.full_signature: public Integer getCountOfDistinctKeys()
focal_method.identifier: getCountOfDistinctKeys
focal_method.invocations: openResources getCountOfDistinctKeys closeResources
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Integer
focal_method.signature: Integer getCountOfDistinctKeys()