Class MapCollectProcedure<T,​K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.function.Consumer<T>, Procedure<T>

    public final class MapCollectProcedure<T,​K,​V>
    extends java.lang.Object
    implements Procedure<T>
    MapCollectProcedure uses a Function to calculate the key for an object and puts the object with the key into the specified Map.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void value​(T object)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Consumer

        andThen
      • Methods inherited from interface org.eclipse.collections.api.block.procedure.Procedure

        accept
    • Field Detail

      • map

        private final java.util.Map<K,​V> map
      • keyFunction

        private final Function<? super T,​? extends K> keyFunction
      • valueFunction

        private final Function<? super T,​? extends V> valueFunction
    • Constructor Detail

      • MapCollectProcedure

        public MapCollectProcedure​(java.util.Map<K,​V> newMap,
                                   Function<? super T,​? extends K> newKeyFunction)
      • MapCollectProcedure

        public MapCollectProcedure​(java.util.Map<K,​V> newMap,
                                   Function<? super T,​? extends K> newKeyFunction,
                                   Function<? super T,​? extends V> newValueFunction)
    • Method Detail

      • value

        public void value​(T object)
        Specified by:
        value in interface Procedure<T>