org.archive.wayback.util
Class PeekableIterator<E>
java.lang.Object
org.archive.wayback.util.PeekableIterator<E>
- Type Parameters:
E -
- All Implemented Interfaces:
- Closeable, Iterator<E>, CloseableIterator<E>
public class PeekableIterator<E>
- extends Object
- implements CloseableIterator<E>
- 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 |
PeekableIterator
public PeekableIterator(Iterator<E> itr)
- Parameters:
itr -
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<E>
- Returns:
- true if this Iterator has another element.
peekNext
public E peekNext()
- Returns:
- Object that will be returned from next(), or null
next
public E next()
- Specified by:
next in interface Iterator<E>
- Returns:
- next Object
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
remove
public void remove()
- Specified by:
remove in interface Iterator<E>
Copyright © 2005-2011 Internet Archive. All Rights Reserved.