Class CycleRange
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.unary_int.CycleRange
- All Implemented Interfaces:
java.util.function.IntUnaryOperator
public class CycleRange
extends java.lang.Object
implements java.util.function.IntUnaryOperator
Yields a value within a specified range, which rolls over continuously.
-
Constructor Summary
Constructors Constructor Description CycleRange(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
Modifier and Type Method Description intapplyAsInt(int operand)
-
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 interfacejava.util.function.IntUnaryOperator
-