Class Range<N extends Number & Comparable<N>>
java.lang.Object
org.junitpioneer.jupiter.params.Range<N>
- Type Parameters:
N- The numerical type used by the range.
- All Implemented Interfaces:
Iterator<N>
- Direct Known Subclasses:
ByteRange, DoubleRange, FloatRange, IntRange, LongRange, ShortRange
An iterator for numerical ranges, used as the backing logic for
RangeSourceArgumentsProvider.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Nprivate N(package private) NgetStep()private NgetZero()The value of the no-op "zero", illegal step in terms of NbooleanhasNext()(package private) booleannext()(package private) abstract NThe next value in the range.(package private) voidvalidate()Asserts the range is valid.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
from
-
to
-
step
-
closed
private final boolean closed -
current
-
sign
private final int sign -
zero
-
-
Constructor Details
-
Range
-
-
Method Details
-
validate
void validate()Asserts the range is valid.- Throws:
IllegalArgumentException- if the range is not valid
-
isValidDescending
boolean isValidDescending() -
getStep
N getStep() -
getCurrent
N getCurrent() -
nextValue
-
getNextValue
-
getZero
The value of the no-op "zero", illegal step in terms of N -
hasNext
-
next
-