net.sf.staccatocommons.iterators
Class UnmodifiableIterator<T>
java.lang.Object
net.sf.staccatocommons.iterators.AbstractUnmodifiableIterator<T>
net.sf.staccatocommons.iterators.UnmodifiableIterator<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Iterator<T>
public final class UnmodifiableIterator<T>
- extends AbstractUnmodifiableIterator<T>
- Author:
- flbulgarelli
UnmodifiableIterator
public UnmodifiableIterator(Iterator<? extends T> iter)
- Creates a new
UnmodifiableIterator
hasNext
public boolean hasNext()
next
public T next()
from
@NonNull
public static <A> Iterator<A> from(Iterator<? extends A> iter)
- Answers an
Iterator view of the given iter that does
not support AbstractUnmodifiableIterator.remove()
- Type Parameters:
A - - Parameters:
element -
- Returns:
- a new
UnmodifiableIterator
toString
public String toString()
- Overrides:
toString in class Object