Class AbstractUntypedIteratorDecorator<I,O>
- java.lang.Object
-
- org.apache.openjpa.lib.util.collections.AbstractUntypedIteratorDecorator<I,O>
-
- All Implemented Interfaces:
java.util.Iterator<O>
- Direct Known Subclasses:
AbstractIteratorDecorator
public abstract class AbstractUntypedIteratorDecorator<I,O> extends java.lang.Object implements java.util.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractUntypedIteratorDecorator(java.util.Iterator<I> iterator)
Create a new AbstractUntypedIteratorDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Iterator<I>
getIterator()
Gets the iterator being decorated.boolean
hasNext()
void
remove()
-
-
-
Constructor Detail
-
AbstractUntypedIteratorDecorator
protected AbstractUntypedIteratorDecorator(java.util.Iterator<I> iterator)
Create a new AbstractUntypedIteratorDecorator.- Parameters:
iterator
- the iterator to decorate- Throws:
java.lang.NullPointerException
- if the iterator is null
-
-
Method Detail
-
getIterator
protected java.util.Iterator<I> getIterator()
Gets the iterator being decorated.- Returns:
- the decorated iterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<I>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<I>
-
-