class TupleArrayIterator extends java.lang.Object implements DbIterator
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.Iterator<Tuple> |
it |
private static long |
serialVersionUID |
(package private) java.util.ArrayList<Tuple> |
tups |
| Constructor and Description |
|---|
TupleArrayIterator(java.util.ArrayList<Tuple> tups) |
| 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()
Gets 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.ArrayList<Tuple> tups
java.util.Iterator<Tuple> it
public TupleArrayIterator(java.util.ArrayList<Tuple> tups)
public void open()
throws DbException,
TransactionAbortedException
DbIteratoropen in interface DbIteratorDbException - when there are problems opening/accessing the database.TransactionAbortedExceptionpublic boolean hasNext()
throws DbException,
TransactionAbortedException
DbIteratorhasNext in interface DbIteratorDbExceptionTransactionAbortedExceptionpublic Tuple next() throws DbException, TransactionAbortedException, java.util.NoSuchElementException
next in interface DbIteratorjava.util.NoSuchElementException - if there are no more tuples.DbExceptionTransactionAbortedExceptionpublic void rewind()
throws DbException,
TransactionAbortedException
rewind in interface DbIteratorDbException - When rewind is unsupported.TransactionAbortedExceptionpublic TupleDesc getTupleDesc()
getTupleDesc in interface DbIteratorpublic void close()
close in interface DbIterator