Class MapTemplate

  • All Implemented Interfaces:
    java.util.function.LongFunction<java.util.Map<java.lang.Object,​java.lang.Object>>

    public class MapTemplate
    extends java.lang.Object
    implements java.util.function.LongFunction<java.util.Map<java.lang.Object,​java.lang.Object>>
    Construct a Map from a set of input functions. In the full four-argument form, the initial boolean argument specifies whether to convert the key and value objects to String form before adding them to the map. The condensed three-argument assumes that a string to string map is desired by default. The last three parameters specify functions for the size, key, and values of the map to be created. For each map created, the size is determined with the size function. Then, a key and value are created for that many entries using the original input value plus a relative index for both the key and value functions respectively.
    • Constructor Summary

      Constructors 
      Constructor Description
      MapTemplate​(boolean stringify, java.util.function.LongToIntFunction sizeFunc, java.util.function.LongFunction<java.lang.Object> keyFunc, java.util.function.LongFunction<java.lang.Object> valueFunc)  
      MapTemplate​(java.util.function.LongToIntFunction sizeFunc, java.util.function.LongFunction<java.lang.Object> keyFunc, java.util.function.LongFunction<java.lang.Object> valueFunc)  
    • Method Summary

      Modifier and Type Method Description
      java.util.Map<java.lang.Object,​java.lang.Object> apply​(long value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapTemplate

        public MapTemplate​(java.util.function.LongToIntFunction sizeFunc,
                           java.util.function.LongFunction<java.lang.Object> keyFunc,
                           java.util.function.LongFunction<java.lang.Object> valueFunc)
      • MapTemplate

        public MapTemplate​(boolean stringify,
                           java.util.function.LongToIntFunction sizeFunc,
                           java.util.function.LongFunction<java.lang.Object> keyFunc,
                           java.util.function.LongFunction<java.lang.Object> valueFunc)
    • Method Detail

      • apply

        public java.util.Map<java.lang.Object,​java.lang.Object> apply​(long value)
        Specified by:
        apply in interface java.util.function.LongFunction<java.util.Map<java.lang.Object,​java.lang.Object>>