Class ValueDerivingMapFactory<O,​K,​V>


  • public class ValueDerivingMapFactory<O,​K,​V>
    extends Object
    A factory for maps that dynamically derive their looked up values from a given source object.
    Author:
    dward
    • Constructor Detail

      • ValueDerivingMapFactory

        public ValueDerivingMapFactory​(Map<K,​ValueDerivingMapFactory.ValueDeriver<O,​V>> valueDerivers)
        Instantiates a new value deriving map factory.
        Parameters:
        valueDerivers - a map of value derivers that derive the value of each entry from a given source
    • Method Detail

      • getMap

        public Map<K,​V> getMap​(O source)
        Gets a map that derives its values from the given source.
        Parameters:
        source - the source
        Returns:
        the map