org.objectweb.dream.util
Class IteratorNoRemove<T>

java.lang.Object
  extended by org.objectweb.dream.util.IteratorNoRemove<T>
Type Parameters:
T - the type of the objects this iterator iterates.
All Implemented Interfaces:
Iterator<T>

public class IteratorNoRemove<T>
extends Object
implements Iterator<T>

An iterator that use a delegate iterator, but does not provides a remove operation.


Constructor Summary
IteratorNoRemove(Iterator<T> delegate)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
          Always throws a UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorNoRemove

public IteratorNoRemove(Iterator<T> delegate)
Parameters:
delegate - the iterator
Method Detail

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()
Always throws a UnsupportedOperationException.

Specified by:
remove in interface Iterator<T>
See Also:
Iterator.remove()


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.