Module io.virtdata.lib.basics
Class MapTemplate
- java.lang.Object
-
- io.virtdata.libbasics.shared.from_long.to_collection.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 aMapfrom 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)
-
-
-
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)
-
-