public final class

UnmodifiableIterator

extends Object
implements Iterator<E> Unmodifiable
java.lang.Object
   ↳ org.apache.commons.collections.iterators.UnmodifiableIterator

Class Overview

Decorates an iterator such that it cannot be modified.

Summary

Public Methods
static Iterator decorate(Iterator iterator)
Decorates the specified iterator such that it cannot be modified.
boolean hasNext()
Object next()
void remove()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Iterator

Public Methods

public static Iterator decorate (Iterator iterator)

Decorates the specified iterator such that it cannot be modified.

If the iterator is already unmodifiable it is returned directly.

Parameters
iterator the iterator to decorate
Throws
IllegalArgumentException if the iterator is null

public boolean hasNext ()

public Object next ()

public void remove ()