org.modeshape.common.collection
Class ReadOnlyIterator<T>
java.lang.Object
org.modeshape.common.collection.ReadOnlyIterator<T>
- Type Parameters:
T
- the type of the elements over which the iteration is being performed
- All Implemented Interfaces:
- Iterator<T>
public final class ReadOnlyIterator<T>
- extends Object
- implements Iterator<T>
An Iterator
implementation that only allows reading elements, used as a wrapper around another iterator to make the
contents immutable to the user of this iterator.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyIterator
public ReadOnlyIterator(Iterator<T> delegate)
hasNext
public boolean hasNext()
-
- Specified by:
hasNext
in interface Iterator<T>
- See Also:
Iterator.hasNext()
next
public T next()
-
- Specified by:
next
in interface Iterator<T>
- See Also:
Iterator.next()
remove
public void remove()
-
- Specified by:
remove
in interface Iterator<T>
- See Also:
Iterator.remove()
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.