Module org.junitpioneer
Package org.junitpioneer.jupiter.params
Class Range<N extends java.lang.Number & java.lang.Comparable<N>>
- java.lang.Object
-
- org.junitpioneer.jupiter.params.Range<N>
-
- Type Parameters:
N- The numerical type used by the range.
- All Implemented Interfaces:
java.util.Iterator<N>
- Direct Known Subclasses:
ByteRange,DoubleRange,FloatRange,IntRange,LongRange,ShortRange
abstract class Range<N extends java.lang.Number & java.lang.Comparable<N>> extends java.lang.Object implements java.util.Iterator<N>An iterator for numerical ranges, used as the backing logic forRangeSourceArgumentsProvider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) NgetCurrent()private NgetNextValue()(package private) NgetStep()private NgetZero()The value of the no-op "zero", illegal step in terms of NbooleanhasNext()(package private) booleanisValidDescending()Nnext()(package private) abstract NnextValue()The next value in the range.(package private) voidvalidate()Asserts the range is valid.
-
-
-
Method Detail
-
validate
void validate()
Asserts the range is valid.- Throws:
java.lang.IllegalArgumentException- if the range is not valid
-
isValidDescending
boolean isValidDescending()
-
getStep
N getStep()
-
getCurrent
N getCurrent()
-
nextValue
abstract N nextValue()
The next value in the range. Callingnext()will return this value and advance the iterator to it.
-
getNextValue
private N getNextValue()
-
getZero
private N getZero()
The value of the no-op "zero", illegal step in terms of N
-
hasNext
public boolean hasNext()
-
-