|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.higgins.util.jscript.SingleObjectImmutableIterator
Allows single objects to be viewed as an iterator
This is a version of Iterator that overrides the remove
method so that items can't be taken out of the bag.
Constructor Summary | |
---|---|
SingleObjectImmutableIterator(Object obj)
Create a new ImmutableIterator |
Method Summary | |
---|---|
boolean |
hasNext()
Standard hasNext method |
Object |
next()
Standard next method |
void |
remove()
Makes sure that no one can remove any elements from the collection |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SingleObjectImmutableIterator(Object obj)
Method Detail |
public boolean hasNext()
hasNext
in interface Iterator
public Object next() throws NoSuchElementException
next
in interface Iterator
NoSuchElementException
public void remove() throws UnsupportedOperationException
remove
in interface Iterator
UnsupportedOperationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |