Class CycleRange
- java.lang.Object
-
- io.virtdata.libbasics.shared.unary_int.CycleRange
-
- All Implemented Interfaces:
java.util.function.IntUnaryOperator
public class CycleRange extends java.lang.Object implements java.util.function.IntUnaryOperatorYields 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 Detail
-
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.
-
-