org.apache.commons.collections4.iterators
Class AbstractUntypedIteratorDecorator<I,O>

java.lang.Object
  extended by org.apache.commons.collections4.iterators.AbstractUntypedIteratorDecorator<I,O>
All Implemented Interfaces:
Iterator<O>
Direct Known Subclasses:
AbstractIteratorDecorator

public abstract class AbstractUntypedIteratorDecorator<I,O>
extends Object
implements Iterator<O>

Provides basic behaviour for decorating an iterator with extra functionality without committing the generic type of the Iterator implementation.

All methods are forwarded to the decorated iterator.

Since:
4.0
Version:
$Id: AbstractUntypedIteratorDecorator.java 1477802 2013-04-30 20:01:28Z tn $

Constructor Summary
protected AbstractUntypedIteratorDecorator(Iterator<I> iterator)
          Create a new AbstractUntypedIteratorDecorator.
 
Method Summary
protected  Iterator<I> getIterator()
          Gets the iterator being decorated.
 boolean hasNext()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
next
 

Constructor Detail

AbstractUntypedIteratorDecorator

protected AbstractUntypedIteratorDecorator(Iterator<I> iterator)
Create a new AbstractUntypedIteratorDecorator.

Parameters:
iterator - the iterator to decorate
Method Detail

getIterator

protected Iterator<I> getIterator()
Gets the iterator being decorated.

Returns:
the decorated iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<O>

remove

public void remove()
Specified by:
remove in interface Iterator<O>


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.