|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PopulationIterator
Allows to iterate over a sparse array's population
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if this population iterator has more elements when traversing the sparse array in the forward direction. |
Object |
next()
Returns the next element in the sparse array. |
int |
nextIndex()
Returns the index of the element that would be returned by a subsequent call to next. |
void |
remove()
Removes from the sparse array the last element that was returned by next (optional operation). |
void |
set(Object o)
Replaces the last element returned by next or previous with the specified element (optional operation). |
| Method Detail |
|---|
boolean hasNext()
hasNext in interface IteratorObject next()
next in interface IteratorNoSuchElementException - if the iteration has no next element.int nextIndex()
void remove()
remove() is equivalent to set(null);.
remove in interface IteratorUnsupportedOperationException - if the remove operation is not supported by this
population iterator.
IllegalStateException - if either nextIndex has been called or next has not been
called.void set(Object o)
o - the element with which to replace the last element returned by
next.
UnsupportedOperationException - if the set operation is not supported by this population
iterator.
ClassCastException - if the class of the specified element prevents it from
being added to this sparse array.
IllegalArgumentException - if some aspect of the specified element prevents it from
being added to this sparse array.
IllegalStateException - if either nextIndex has been called or next has not been
called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||