org.archive.wayback.util
Class CompositeSortedIterator<E>
java.lang.Object
org.archive.wayback.util.CompositeSortedIterator<E>
- Type Parameters:
E -
- All Implemented Interfaces:
- Closeable, Iterator<E>, CloseableIterator<E>
public class CompositeSortedIterator<E>
- extends Object
- implements CloseableIterator<E>
Composite of multiple Iterators that returns the next from a series of
all component Iterators based on Comparator constructor argument.
- 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 |
CompositeSortedIterator
public CompositeSortedIterator(Comparator<E> comparator)
- Parameters:
comparator - Comparator to use for sorting order
addComponent
public void addComponent(Iterator<E> itr)
- Parameters:
itr - Iterator which is a component of this composite
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<E>
next
public E next()
- Specified by:
next in interface Iterator<E>
remove
public void remove()
- Specified by:
remove in interface Iterator<E>
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
Copyright © 2005-2011 Internet Archive. All Rights Reserved.