public class TupleIterator extends java.lang.Object implements DbIterator
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.Iterator<Tuple> |
i |
private static long |
serialVersionUID |
(package private) TupleDesc |
td |
(package private) java.lang.Iterable<Tuple> |
tuples |
| Constructor and Description |
|---|
TupleIterator(TupleDesc td,
java.lang.Iterable<Tuple> tuples)
Constructs an iterator from the specified Iterable, and the specified
descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the iterator.
|
TupleDesc |
getTupleDesc()
Returns the TupleDesc associated with this DbIterator.
|
boolean |
hasNext()
Returns true if the iterator has more tuples.
|
Tuple |
next()
Returns the next tuple from the operator (typically implementing by reading
from a child operator or an access method).
|
void |
open()
Opens the iterator.
|
void |
rewind()
Resets the iterator to the start.
|
private static final long serialVersionUID
java.util.Iterator<Tuple> i
TupleDesc td
java.lang.Iterable<Tuple> tuples
public void open()
DbIteratoropen in interface DbIteratorpublic boolean hasNext()
DbIteratorhasNext in interface DbIteratorpublic Tuple next()
DbIteratornext in interface DbIteratorpublic void rewind()
DbIteratorrewind in interface DbIteratorpublic TupleDesc getTupleDesc()
DbIteratorgetTupleDesc in interface DbIteratorpublic void close()
DbIteratorclose in interface DbIterator