Grouping data topic
Group discrete values.
Functions
-
group<
T, K> (Iterable< Grouping dataT> iterable, K key(T)) → Map<K, List< T> > -
Groups the specified
iterable
of values into an Map fromkey
to list of value. -
groupSort<
T, K> (Iterable< Grouping dataT> iterable, K key(T), [num valueComparator(List<T> , List<T> ) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups the specified
iterable
of elements according to the specifiedkey
function, sorts the groups according to the specifiedvalueComparator
for values andkeyComparator
for keys, and then returns a list of keys in sorted order. -
index<
T, K> (Iterable< Grouping dataT> iterable, K key(T)) → Map<K, List< T> > - Equivalent to group but returns a unique value per compound key instead of an list, throwing if the key is not unique.
-
rollup<
T, R, K> (Iterable< Grouping dataT> iterable, R reduce(List<T> ), K key(T)) → Map<K, R> -
Groups and reduces the specified
iterable
of values into an Map from key to value. -
rollupSort<
T, R, K> (Iterable< Grouping dataT> iterable, R reduce(List<T> ), K key(T), [num valueComparator(R, R) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups and reduces the specified
iterable
of elements according to the specifiedkey
function, sorts the reduced groups according to the specifiedvalueComparator
for values andkeyComparator
for keys, and then returns a list of keys in sorted order.