Class MapSettableTransformer<I,​O>

  • All Implemented Interfaces:
    SettableTransformer<I,​O>, org.apache.commons.collections4.Transformer<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
      void set​(I input, O output)
      Sets the value (output) to be returned by a call to transform(input)).
      O transform​(I input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
    • Method Detail

      • transform

        public O transform​(I input)
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<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>