Class DistinctValues<K,V,T,E>

Type Parameters:
T - the type of the value to extract from
E - the type of the extracted value
All Implemented Interfaces:
ExternalizableLite, PortableObject, InvocableMap.EntryAggregator<K,V,Collection<E>>, InvocableMap.StreamingAggregator<K,V,Object,Collection<E>>, Serializable, Cloneable

public class DistinctValues<K,V,T,E> extends AbstractAggregator<K,V,T,E,Collection<E>>
Return the set of unique values extracted from a set of entries in a Map. If the set of entries is empty, an empty set is returned.

This aggregator could be used in combination with MultiExtractor allowing to collect all unique combinations (tuples) of a given set of attributes.

The DistinctValues aggregator covers a simple case of a more generic aggregation pattern implemented by the GroupAggregator, which in addition to collecting all distinct values or tuples, runs an aggregation against each distinct entry set (group).

Author:
jh 2005.12.20
See Also: