| Modifier and Type | Field and Description |
|---|---|
protected int |
idx
Current index within the iterated sequence.
|
protected int |
value
Current value of iterated sequence.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IntegerIterator(int start,
int count,
int step)
Instantiates a new arithmetic iterator with the given start, number of
iteration steps and value increment.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Iterator<Integer> |
iterator() |
Integer |
next() |
void |
remove()
Throws
UnsupportedOperationException. |
static IntegerIterator |
withCount(int count)
Constructs a simple
count-step arithmetic sequence that
starts at 0 and increments by 1 in each iteration. |
static IntegerIterator |
withCountAndStep(int count,
int step)
Constructs a
count-step arithmetic sequence that
starts at 0 and increments by step in each iteration. |
static IntegerIterator |
withStartCountStep(int start,
int count,
int step)
Constructs a
count-step arithmetic sequence that
starts at start and increments by step in each iteration. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorprotected int idx
protected int value
start - step.protected IntegerIterator(int start,
int count,
int step)
start - initial sequence valuecount - number of stepsstep - increment of the sequence value during one steppublic static IntegerIterator withCount(int count)
count-step arithmetic sequence that
starts at 0 and increments by 1 in each iteration.count - number of stepsIntegerIteratorpublic static IntegerIterator withCountAndStep(int count, int step)
count-step arithmetic sequence that
starts at 0 and increments by step in each iteration.count - number of stepsstep - increment of the value in each stepIntegerIteratorpublic static IntegerIterator withStartCountStep(int start, int count, int step)
count-step arithmetic sequence that
starts at start and increments by step in each iteration.start - initial sequence valuecount - number of stepsstep - increment of the value in each stepIntegerIteratorpublic void remove()
UnsupportedOperationException.Copyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.