Package net.andreinc.mockneat.unit.seq
Class IntSeq
java.lang.Object
net.andreinc.mockneat.unit.seq.IntSeq
- All Implemented Interfaces:
MockUnit<java.lang.Integer>,MockUnitInt
public class IntSeq extends java.lang.Object implements MockUnitInt
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description IntSeqcycle(boolean cycle)Enables or disables the "cycling" in the elements, if the max value was reached.IntSeqincrement(int increment)Sets theincrementof theIntSeq.static IntSeqintSeq()Returns aIntSeqobject that can be used to generate arbitraryIntegernumbers in a sequence.IntSeqmax(int max)Sets the max value that can be generated by the currentIntSeq.IntSeqmin(int min)Sets the min value that can be generated by the currentIntSeq.IntSeqstart(int start)Sets thestartvalue of theIntSeq.java.util.function.Supplier<java.lang.Integer>supplier()This is the sole abstract method of the interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnit
array, array, collection, collection, collection, collection, collection, collection, consume, consume, get, get, list, list, list, list, list, list, map, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapToDouble, mapToInt, mapToLocalDate, mapToLong, mapToString, mapToString, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, serialize, set, set, set, set, set, set, stream, val, val, valStr, valStrMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnitInt
array, arrayPrimitive, intStream
-
Constructor Details
-
Method Details
-
intSeq
Returns a
IntSeqobject that can be used to generate arbitraryIntegernumbers in a sequence.- Returns:
- A re-usable
IntSeqobject. TheIntSeqclass implementsMockUnitInt.
-
start
Sets the
startvalue of theIntSeq.By default the starting value is 0.
- Parameters:
start- The starting value.- Returns:
- The same
IntSeqobject.
-
increment
Sets the
incrementof theIntSeq.By default the increment value is 1.
- Parameters:
increment- The increment's value.- Returns:
- The same
IntSeqobject.
-
cycle
Enables or disables the "cycling" in the elements, if the max value was reached.
- Parameters:
cycle- The status of "cycling".- Returns:
- The same
IntSeqobject.
-
max
Sets the max value that can be generated by the current
IntSeq.By default, the value is set
Integer.MAX_VALUE.- Parameters:
max- The max value that can be generated by the currentIntSeq.- Returns:
- The same
IntSeqobject.
-
min
Sets the min value that can be generated by the current
IntSeq.By default, the value is set to
Integer.MIN_VALUE- Parameters:
min- The min value that can be generated by the currentIntSeq- Returns:
- The same
IntSeqobject.
-
supplier
public java.util.function.Supplier<java.lang.Integer> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented.
-