org.inria.ns.reflex.util
Class CollectionsHelper.UnmodifiableIterator

java.lang.Object
  extended by org.inria.ns.reflex.util.CollectionsHelper.UnmodifiableIterator
All Implemented Interfaces:
Iterator
Enclosing class:
CollectionsHelper

public static class CollectionsHelper.UnmodifiableIterator
extends Object
implements Iterator

An unmodifiable Iterator.

remove() is ineffective.


Constructor Summary
CollectionsHelper.UnmodifiableIterator(Iterator iterator)
          Create an unmodifiable iterator.
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
          Do not remove.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionsHelper.UnmodifiableIterator

public CollectionsHelper.UnmodifiableIterator(Iterator iterator)
Create an unmodifiable iterator.

Parameters:
iterator - The iterator to wrap.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator
See Also:
Iterator.hasNext()

next

public Object next()
Specified by:
next in interface Iterator
See Also:
Iterator.next()

remove

public void remove()
Do not remove.

Specified by:
remove in interface Iterator