public interface IntegerSequence
Modifier and Type | Interface and Description |
---|---|
static class |
IntegerSequence.Combined
This is a sequence of sequences
|
static class |
IntegerSequence.Explicit
An array of integers which was explicitly specified
|
static class |
IntegerSequence.For
A sequence of integers which has been specified using a start number, end number, and step size.
|
static class |
IntegerSequence.Range
A sequence of integers which has been specified using a start number, end number, and step size and uses
the known upper limit of the array to bound it
Examples:
:
2:
2:3:
|
static class |
IntegerSequence.Type |
Modifier and Type | Method and Description |
---|---|
IntegerSequence.Type |
getType() |
boolean |
hasNext() |
void |
initialize(int maxIndex)
Specifies the maximum index of the array.
|
int |
length() |
int |
next() |
boolean |
requiresMaxIndex() |
int length()
void initialize(int maxIndex)
maxIndex
- Largest possible value in the sequence. or < 0 if unknownint next()
boolean hasNext()
IntegerSequence.Type getType()
boolean requiresMaxIndex()