Class MapCollectProcedure<T,K,V>

java.lang.Object
org.eclipse.collections.impl.block.procedure.MapCollectProcedure<T,K,V>
All Implemented Interfaces:
Serializable, Consumer<T>, Procedure<T>

public final class MapCollectProcedure<T,K,V> extends 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • map

      private final Map<K,V> map
    • keyFunction

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

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

    • MapCollectProcedure

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

      public MapCollectProcedure(Map<K,V> newMap, Function<? super T,? extends K> newKeyFunction, Function<? super T,? extends V> newValueFunction)
  • Method Details

    • value

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