java.lang.Object
javatools.db.DbTableIterator
javatools.db.DbCachedIterator
- All Implemented Interfaces:
- DbIterator, java.util.Iterator
- public class DbCachedIterator
- extends DbTableIterator
A class to represent a "cached" DbIterator, that is an iterator that can be
called more than once.
- Version:
- 0.0.1
|
Method Summary |
boolean |
hasNext()
Checks if this iterator has a value after the current one. |
boolean |
hasNextRow()
Are there more rows to iterator through? |
java.lang.Object |
next()
Takes the next object from the iterator. |
DbRow |
nextRow()
Get the next DbRow in the table. |
void |
remove()
Removes the current element in the iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resultIt
private java.util.Iterator resultIt
DbCachedIterator
public DbCachedIterator(DbCachedTable table)
- Creates new DbCachedIterator
hasNext
public boolean hasNext()
- Checks if this iterator has a value after the current one.
- Specified by:
hasNext in interface java.util.Iterator- Overrides:
hasNext in class DbTableIterator
hasNextRow
public boolean hasNextRow()
throws DbException
- Are there more rows to iterator through?
- Specified by:
hasNextRow in interface DbIterator- Overrides:
hasNextRow in class DbTableIterator
next
public java.lang.Object next()
- Takes the next object from the iterator.
- Specified by:
next in interface java.util.Iterator- Overrides:
next in class DbTableIterator
nextRow
public DbRow nextRow()
throws DbException
- Get the next DbRow in the table.
- Specified by:
nextRow in interface DbIterator- Overrides:
nextRow in class DbTableIterator
remove
public void remove()
- Removes the current element in the iterator.
- Specified by:
remove in interface DbIterator- Overrides:
remove in class DbTableIterator