Class MapSettableTransformer<I,O>

java.lang.Object
edu.uci.ics.jung.algorithms.util.MapSettableTransformer<I,O>
All Implemented Interfaces:
com.google.common.base.Function<I,O>, SettableTransformer<I,O>, Function<I,O>

public class MapSettableTransformer<I,O> extends Object implements SettableTransformer<I,O>
A SettableTransformer that operates on an underlying Map instance. Similar to MapTransformer.
  • Field Details

    • map

      protected Map<I,O> map
  • Constructor Details

    • MapSettableTransformer

      public MapSettableTransformer(Map<I,O> m)
      Creates an instance based on m.
      Parameters:
      m - the map on which this instance is based
  • Method Details

    • apply

      public O apply(I input)
      Specified by:
      apply in interface com.google.common.base.Function<I,O>
      Specified by:
      apply in interface Function<I,O>
    • set

      public void set(I input, O output)
      Description copied from interface: SettableTransformer
      Sets the value (output) to be returned by a call to transform(input)).
      Specified by:
      set in interface SettableTransformer<I,O>
      Parameters:
      input - the value whose output value is being specified
      output - the output value for input