|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cosmic.util.ImmutableIterator
A class of iterator that does not allow modification of the underlying collection. Author: James.A.Marshall@imperial.ac.uk
Field Summary | |
private java.util.Iterator |
mIterator
The iterator that the immutable iterator uses |
Constructor Summary | |
ImmutableIterator(java.util.Iterator iterator)
Constructor for the ImmutableIterator class |
Method Summary | |
boolean |
hasNext()
Returns true if the iterator has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration |
void |
remove()
Removal through an immutable iterator is not permitted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Iterator mIterator
Constructor Detail |
public ImmutableIterator(java.util.Iterator iterator)
Method Detail |
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
java.lang.RuntimeException
- if called
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |