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()
DbIterator
open
in interface DbIterator
public boolean hasNext()
DbIterator
hasNext
in interface DbIterator
public Tuple next()
DbIterator
next
in interface DbIterator
public void rewind()
DbIterator
rewind
in interface DbIterator
public TupleDesc getTupleDesc()
DbIterator
getTupleDesc
in interface DbIterator
public void close()
DbIterator
close
in interface DbIterator