Class Grouped<K,​V,​T>

  • Type Parameters:
    K - Type of key
    V - Type of value
    T - Type of entry objects of functions
    All Implemented Interfaces:
    Map<K,​List<V>>

    public final class Grouped<K,​V,​T>
    extends MapEnvelope<K,​List<V>>
    Iterable as Map.

    This class groups objects from iterable by applying functions for keys and values

    There is no thread-safety guarantee.

    Since:
    0.30
    • Constructor Detail

      • Grouped

        public Grouped​(Iterable<? extends T> list,
                       Function<? super T,​? extends K> keys,
                       Function<? super T,​? extends V> values)
        Ctor.
        Parameters:
        list - Iterable which is used to retrieve data from
        keys - Function to get a key
        values - Function to get a value