|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--xxl.cursors.ArrayCursor
The ArrayCursor constructs a Cursor for a given Array.
| Field Summary | |
protected java.lang.Object[] |
array
Data array. |
protected java.lang.Integer |
index
Actual position in the array. |
protected java.util.Iterator |
indices
Iterator of indices of the elements that are to be returned by the ArrayCursor. |
| Constructor Summary | |
ArrayCursor(java.lang.Object[] array)
Creates a new ArrayCursor. |
|
ArrayCursor(java.lang.Object[] array,
java.util.Iterator indices)
Creates a new ArrayCursor. |
|
| 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). |
void |
reset()
Resets the Cursor to its initial state. |
boolean |
supportsPeek()
Returns true if the peek operation is supported by this PeekIterator (Always returns false.). |
void |
update(java.lang.Object object)
Replaces the object that was returned by the last call to next() or peek(). |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.lang.Object[] array
protected java.util.Iterator indices
protected java.lang.Integer index
| Constructor Detail |
public ArrayCursor(java.lang.Object[] array,
java.util.Iterator indices)
array - the Array fow which the Cursor is to be createdindices - Iterator of indices. The indices of this
iterator determine which elements will be returned.public ArrayCursor(java.lang.Object[] array)
array - the Array for which the Cursor is to be created| 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.IllegalStateException
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 | ||||||||