|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.collections.ArrayIterator
The ArrayIterator class implements the Iterator interface. The underlying storage mechanism for the iterator's data is an array supplied to the constructor of the class. The methods of the Iterator interface simply navigate the array. The remove method is not supported in this implementation of the class.
Iterator| Constructor Summary | |
ArrayIterator(Object[] data)
Create a new ArrayIterator. |
|
| Method Summary | |
boolean |
hasNext()
Returns true if the iteration has more elements. |
Object |
next()
Returns the next element in the iteration. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArrayIterator(Object[] data)
data - an array of data to iterate over.| Method Detail |
public boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface IteratorNoSuchElementException - iteration has no more elements.public void remove()
NOTE:This method is not supported
remove in interface IteratorUnsupportedOperationException - if the remove
operation is not supported by this Iterator.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||