|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xxl.cursors.Enumerator
The Enumerator-iterator returns a sequence of Integer-objects of a given range.
| Field Summary | |
protected int |
from
Start of the sequence (inclusive). |
protected int |
next
The value returned by the next call to next() or peek(). |
protected int |
to
End of the sequence (exclusive). |
protected boolean |
up
If true the sequence is ascending else the sequence is descending. |
| Constructor Summary | |
Enumerator()
Creates an Enumerator object. |
|
Enumerator(int number)
Creates an Enumerator object. |
|
Enumerator(int from,
int to)
Creates an Enumerator object. |
|
| Method Summary | |
void |
close()
Closes the Cursor. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration. |
java.lang.Object |
peek()
Shows the next element in the iteration without removing it. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation/This method always throws an UnsupportedOperationException). |
void |
reset()
Resets the Cursor to its initial state. |
boolean |
supportsPeek()
Returns true if the peek operation is supported by this PeekIterator (This method returns true.). |
void |
update(java.lang.Object object)
Replaces the object that was returned by the last call to next() or peek() (This method always throws an UnsupportedOperationException). |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected int from
protected int to
protected int next
protected boolean up
| Constructor Detail |
public Enumerator(int from,
int to)
from - start of the sequence (inclusive)to - end of the sequence (inclusive)public Enumerator(int number)
number - end of the sequence (exclusive)public Enumerator()
| Method Detail |
public void close()
public boolean hasNext()
public java.lang.Object next()
throws java.util.NoSuchElementException
public java.lang.Object peek()
throws java.lang.UnsupportedOperationException
public void remove()
throws java.lang.UnsupportedOperationException
public void reset()
throws java.lang.UnsupportedOperationException
public boolean supportsPeek()
public void update(java.lang.Object object)
throws java.lang.UnsupportedOperationException
object - the object that replaces the object returned
by the last call to next() or peek()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||