public final class LongRangeIterator extends java.lang.Object implements Iterator<java.lang.Long>
Modifier | Constructor and Description |
---|---|
|
LongRangeIterator(long max)
Constructs an long number range iterator with the lower bound equal to zero and the increment
value equal to one.
|
|
LongRangeIterator(long min,
long max)
Constructs an long number range iterator with the increment value equal to one.
|
|
LongRangeIterator(long min,
long max,
long inc)
Constructs an range iterator.
|
protected |
LongRangeIterator(LongRangeIterator r)
Constructs a copy of the iterator.
|
Modifier and Type | Method and Description |
---|---|
LongRangeIterator |
clone()
Returns a copy of the iterator.
|
boolean |
hasValue()
Checks if the iterator is not exhausted (a value is available).
|
void |
init()
Initializes the iterator.
|
void |
next()
Makes an iteration.
|
void |
setValue(long value)
Sets the current value.
|
void |
stop()
Stops the iterator.
|
java.lang.Long |
value()
Returns the current value of the iterator.
|
public LongRangeIterator(long min, long max, long inc)
min
- the lower bound.max
- the upper bound.inc
- the increment value (step).public LongRangeIterator(long min, long max)
min
- the lower bound.max
- the upper bound.public LongRangeIterator(long max)
max
- the upper bound.protected LongRangeIterator(LongRangeIterator r)
r
- the iterator to be copied.public void setValue(long value)
value
- the value to set.public void init()
Iterator
public boolean hasValue()
Iterator
public java.lang.Long value()
Iterator
public void next()
Iterator
public void stop()
Iterator
public LongRangeIterator clone()
Iterator