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.
|
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.Iterator
Iterator.hasNext()
public java.lang.Object next()
next
in interface java.util.Iterator
Iterator.next()
public void remove()
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
Iterator.remove()
Copyright ? 2013 Regents of the University of California