Class CycleRange
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.unary_int.CycleRange
- All Implemented Interfaces:
IntUnaryOperator
Yields a value within a specified range, which rolls over continuously.
-
Constructor Summary
ConstructorsConstructorDescriptionCycleRange(int maxValue) Sets the maximum value of the cycle range.CycleRange(int minValue, int maxValue) Sets the minimum and maximum value of the cycle range. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.IntUnaryOperator
andThen, compose
-
Constructor Details
-
CycleRange
public CycleRange(int maxValue) Sets the maximum value of the cycle range. The minimum is default to 0.- Parameters:
maxValue- The maximum value in the cycle to be added.
-
CycleRange
public CycleRange(int minValue, int maxValue) Sets the minimum and maximum value of the cycle range.- Parameters:
minValue- minimum value of the cycle to be added.maxValue- maximum value of the cycle to be added.
-
-
Method Details
-
applyAsInt
public int applyAsInt(int operand) - Specified by:
applyAsIntin interfaceIntUnaryOperator
-