|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.util.ImmutableIterator
ImmutableIterator overrides the remove method
of java.util.Iterator for situations where the items
must not be taken out of the backing collection.
| Constructor Summary | |
ImmutableIterator(Iterator iterator)
Create a new ImmutableIterator |
|
| Method Summary | |
boolean |
hasNext()
Check for a next Object. |
Object |
next()
Get the next Object. |
void |
remove()
Unsupported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImmutableIterator(Iterator iterator)
iterator - the Iterator to be wrapped.| Method Detail |
public boolean hasNext()
hasNext in interface Iterator
public Object next()
throws NoSuchElementException
next in interface IteratorNoSuchElementException - if another Object does not exist.
public void remove()
throws UnsupportedOperationException
remove in interface IteratorUnsupportedOperationException - is thrown in all cases
because this backing Collection is immutable via this Iterator.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||