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
DbIterator
open
in interface DbIterator
DbException
- when there are problems opening/accessing the database.TransactionAbortedException
public boolean hasNext() throws DbException, TransactionAbortedException
DbIterator
hasNext
in interface DbIterator
DbException
TransactionAbortedException
public Tuple next() throws DbException, TransactionAbortedException, java.util.NoSuchElementException
next
in interface DbIterator
java.util.NoSuchElementException
- if there are no more tuples.DbException
TransactionAbortedException
public void rewind() throws DbException, TransactionAbortedException
rewind
in interface DbIterator
DbException
- When rewind is unsupported.TransactionAbortedException
public TupleDesc getTupleDesc()
getTupleDesc
in interface DbIterator
public void close()
close
in interface DbIterator