Class MapSettableTransformer<I,​O>

  • All Implemented Interfaces:
    com.google.common.base.Function<I,​O>, SettableTransformer<I,​O>, java.util.function.Function<I,​O>

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

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<I,​O> map  
    • Constructor Summary

      Constructors 
      Constructor Description
      MapSettableTransformer​(java.util.Map<I,​O> m)
      Creates an instance based on m.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      O apply​(I input)  
      void set​(I input, O output)
      Sets the value (output) to be returned by a call to transform(input)).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Field Detail

      • map

        protected java.util.Map<I,​O> map
    • Constructor Detail

      • MapSettableTransformer

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

      • apply

        public O apply​(I input)
        Specified by:
        apply in interface com.google.common.base.Function<I,​O>
        Specified by:
        apply in interface java.util.function.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