Class HashRange
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.HashRange
- All Implemented Interfaces:
java.util.function.LongUnaryOperator
public class HashRange
extends java.lang.Object
implements java.util.function.LongUnaryOperator
Return a value within a range, pseudo-randomly. This is equivalent to
returning a value with in range between 0 and some maximum value, but
with a minimum value added.
You can specify hash ranges as small as a single-element range, like
(5,5), or as wide as the relevant data type allows.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description longapplyAsLong(long operand)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.LongUnaryOperator
andThen, compose
-
Constructor Details
-
HashRange
public HashRange(long width) -
HashRange
public HashRange(long minValue, long maxValue)
-
-
Method Details
-
applyAsLong
public long applyAsLong(long operand)- Specified by:
applyAsLongin interfacejava.util.function.LongUnaryOperator
-