public class SortedTupleIterator
extends java.lang.Object
implements java.util.Iterator
| Constructor and Description |
|---|
SortedTupleIterator(java.util.Iterator iter,
java.util.Comparator c)
Create a new SortedTupleIterator that sorts tuples in the given
iterator using the given comparator.
|
SortedTupleIterator(java.util.Iterator iter,
int size,
java.util.Comparator c)
Create a new SortedTupleIterator that sorts tuples in the given
iterator using the given comparator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
void |
init(java.util.Iterator iter,
java.util.Comparator c)
Initialize this iterator for the given source iterator and
comparator.
|
java.lang.Object |
next() |
void |
remove()
Throws an UnsupportedOperationException
|
public SortedTupleIterator(java.util.Iterator iter,
java.util.Comparator c)
iter - the source iterator of tuplesc - the comparator to use for sortingpublic SortedTupleIterator(java.util.Iterator iter,
int size,
java.util.Comparator c)
iter - the source iterator of tuplessize - the expected number of tuples in the iteratorc - the comparator to use for sortingpublic void init(java.util.Iterator iter,
java.util.Comparator c)
iter - the source iterator of tuplesc - the comparator to use for sortingpublic boolean hasNext()
hasNext in interface java.util.IteratorIterator.hasNext()public java.lang.Object next()
next in interface java.util.IteratorIterator.next()public void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationExceptionIterator.remove()