org.apache.commons.collections.iterators
Class AbstractIteratorDecorator<E>
java.lang.Object
org.apache.commons.collections.iterators.AbstractIteratorDecorator<E>
- All Implemented Interfaces:
- Iterator<E>
- Direct Known Subclasses:
- AbstractDualBidiMap.EntrySetIterator, AbstractDualBidiMap.KeySetIterator, AbstractDualBidiMap.ValuesIterator
public class AbstractIteratorDecorator<E>
- extends Object
- implements Iterator<E>
Provides basic behaviour for decorating an iterator with extra functionality.
All methods are forwarded to the decorated iterator.
- Since:
- Commons Collections 3.0
- Version:
- $Revision: 1.1.1.1 $ $Date: 2005/05/23 04:34:43 $
- Author:
- Matt Hall, John Watkinson, James Strachan, Stephen Colebourne
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iterator
protected final Iterator<E> iterator
- The iterator being decorated
AbstractIteratorDecorator
public AbstractIteratorDecorator(Iterator<E> iterator)
- Constructor that decorates the specified iterator.
- Parameters:
iterator
- the iterator to decorate, must not be null
- Throws:
IllegalArgumentException
- if the collection is null
getIterator
protected Iterator<E> getIterator()
- Gets the iterator being decorated.
- Returns:
- the decorated iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<E>
next
public E next()
- Specified by:
next
in interface Iterator<E>
remove
public void remove()
- Specified by:
remove
in interface Iterator<E>
Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.