org.chromattic.common
Class AdaptingIterator<O,I>
java.lang.Object
org.chromattic.common.AdaptingIterator<O,I>
- Type Parameters:
O - the outter typeI - the inner type
- All Implemented Interfaces:
- Iterator<O>
public class AdaptingIterator<O,I>
- extends Object
- implements Iterator<O>
An iterator that adapts a type to another type.
- Version:
- $Revision$
- Author:
- Julien Viet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdaptingIterator
public AdaptingIterator(Iterator<I> iterator,
TypeAdapter<O,I> adapter)
throws NullPointerException
- Build a new adapting iterator.
- Parameters:
iterator - the iteratoradapter - the adapter
- Throws:
NullPointerException - if any argument is null
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<O>
next
public O next()
- Specified by:
next in interface Iterator<O>
remove
public void remove()
- Specified by:
remove in interface Iterator<O>
Copyright © 2010 eXo Platform SAS. All Rights Reserved.