org.archive.wayback.util
Class AdaptedIterator<S,T>
java.lang.Object
org.archive.wayback.util.AdaptedIterator<S,T>
- Type Parameters:
S - T -
- All Implemented Interfaces:
- Closeable, Iterator<T>, CloseableIterator<T>
public class AdaptedIterator<S,T>
- extends Object
- implements CloseableIterator<T>
Iterator that transforms objects of one type to another.
- Version:
- $Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
itr
protected Iterator<S> itr
adapter
protected Adapter<S,T> adapter
AdaptedIterator
public AdaptedIterator(Iterator<S> itr,
Adapter<S,T> adapter)
- Parameters:
itr - adapter -
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
Copyright © 2005-2011 Internet Archive. All Rights Reserved.