org.apache.commons.collections.iterators

Class UnmodifiableListIterator

public final class UnmodifiableListIterator extends Object implements ListIterator, Unmodifiable

Decorates a list iterator such that it cannot be modified.

Since: Commons Collections 3.0

Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Stephen Colebourne

Method Summary
voidadd(Object obj)
static ListIteratordecorate(ListIterator iterator)
Decorates the specified iterator such that it cannot be modified.
booleanhasNext()
booleanhasPrevious()
Objectnext()
intnextIndex()
Objectprevious()
intpreviousIndex()
voidremove()
voidset(Object obj)

Method Detail

add

public void add(Object obj)

decorate

public static ListIterator decorate(ListIterator iterator)
Decorates the specified iterator such that it cannot be modified.

Parameters: iterator the iterator to decorate

Throws: IllegalArgumentException if the iterator is null

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public Object next()

nextIndex

public int nextIndex()

previous

public Object previous()

previousIndex

public int previousIndex()

remove

public void remove()

set

public void set(Object obj)
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.