Class MapSizedHashed
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_collection.MapSizedHashed
- All Implemented Interfaces:
java.util.function.LongFunction<java.util.Map<java.lang.Object,java.lang.Object>>
public class MapSizedHashed
extends java.lang.Object
implements java.util.function.LongFunction<java.util.Map<java.lang.Object,java.lang.Object>>
Create a Map from a long input based on a set of provided key and value functions.
Any duplicate entries produced by the key functions are elided.
As a 'Sized' function, the first argument is a function which determines the size of the resulting map.
Additional functions provided are used to generate the elements to add to the collection, as in the pair-wise
mode of
MapFunctions. If the size is larger than the number of provided functions, the last provided
function is used repeatedly as needed. (respectively for key functions as well as value functions)
As a 'Hashed' function, the input value is hashed again before being used by each key and value function.-
Constructor Summary
Constructors Constructor Description MapSizedHashed(int size, java.lang.Object... funcs)MapSizedHashed(java.lang.Object sizeFunc, java.lang.Object... funcs) -
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 Details
-
MapSizedHashed
public MapSizedHashed(java.lang.Object sizeFunc, java.lang.Object... funcs) -
MapSizedHashed
public MapSizedHashed(int size, java.lang.Object... funcs)
-
-
Method Details
-
apply
public java.util.Map<java.lang.Object,java.lang.Object> apply(long value)- Specified by:
applyin interfacejava.util.function.LongFunction<java.util.Map<java.lang.Object,java.lang.Object>>
-