|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RowIterator
A bidirectional iterator over a collection of Row
s.
Method Summary | |
---|---|
void |
add(Row row)
Add a Row at the current position in my underlying collection, or throw
UnsupportedOperationException . |
Row |
current()
Returns the last Row returned by me (by next() ,previous() ,
first() ,last() , etc.). |
int |
currentIndex()
Returns the index of the current() row, if any. |
Row |
first()
Returns the first Row in the list, positioning the cursor to just before
the first Row in the list. |
boolean |
hasCurrent()
Returns true if I have a current Row . |
boolean |
hasNext()
Returns true if I have more Row s when traversing the list
in the forward direction. |
boolean |
hasPrevious()
Returns true if I have more Row s when traversing the list
in the reverse direction. |
boolean |
isEmpty()
Returns true if there are no rows to report with this iterator. |
Row |
last()
Returns the last Row in the list, positioning the cursor to just after the
last Row in the list. |
Row |
next()
Returns the next Row in the list, or throws
NoSuchElementException if no next Row exists. |
int |
nextIndex()
Returns the index of the next() row, if any, or the number of elements is
the iterator if we've reached the end. |
Row |
peekNext()
Return the value that would be returned by a call to next() , if any, but
don't update my position. |
Row |
peekPrevious()
Return the value that would be returned by a call to previous() , if any,
but don't update my position. |
Row |
previous()
Returns the previous Row in the list, or throws
NoSuchElementException if no next Row exists. |
int |
previousIndex()
Returns the index of the previous() row, if any, or -1 if we're add the
beginning of the list. |
void |
remove()
Set the Row at the current position in my underlying collection, or throw
UnsupportedOperationException . |
void |
reset()
Re-initialize this RowIterator to its initial state (positioned just
before the first Row in the list). |
void |
set(Row row)
Set the Row at the current position in my underlying collection, or throw
UnsupportedOperationException . |
Method Detail |
---|
void add(Row row) throws UnsupportedOperationException, AxionException
Row
at the current position in my underlying collection, or throw
UnsupportedOperationException
. (Optional operation.)
UnsupportedOperationException
AxionException
Row current() throws NoSuchElementException
Row
returned by me (by next()
,previous()
,
first()
,last()
, etc.).
NoSuchElementException
- when no Row
has yet been returnedint currentIndex() throws NoSuchElementException
current()
row, if any.
NoSuchElementException
- when no Row
has yet been returnedRow first() throws NoSuchElementException, AxionException
Row
in the list, positioning the cursor to just before
the first Row
in the list. (In other words, after first
is
called both next()
and current()
will return the first row in the
list.)
NoSuchElementException
- when there is no first Row
AxionException
- when a problem occurs accessing the Row
boolean hasCurrent()
true
if I have a current Row
. (In other words,
returns true
iff current()
would return a Row
rather
than throwing an exception.)
boolean hasNext()
true
if I have more Row
s when traversing the list
in the forward direction. (In other words, returns true
iff
next()
would return a Row
rather than throwing an exception.)
boolean hasPrevious()
true
if I have more Row
s when traversing the list
in the reverse direction. (In other words, returns true
iff
previous()
would return a Row
rather than throwing an exception.)
boolean isEmpty()
true
if there are no rows to report with this iterator.
Row last() throws NoSuchElementException, AxionException
Row
in the list, positioning the cursor to just after the
last Row
in the list. (In other words, after last
is called
both previous()
and current()
will return the last row in the list.)
NoSuchElementException
- when there is no last Row
AxionException
- when a problem occurs accessing the Row
Row next() throws NoSuchElementException, AxionException
Row
in the list, or throws
NoSuchElementException
if no next Row
exists.
NoSuchElementException
- when there is no next Row
AxionException
- when a problem occurs accessing the Row
int nextIndex()
next()
row, if any, or the number of elements is
the iterator if we've reached the end.
Row peekNext() throws NoSuchElementException, AxionException
next()
, if any, but
don't update my position.
NoSuchElementException
- when there is no next Row
AxionException
- when a problem occurs accessing the Row
Row peekPrevious() throws NoSuchElementException, AxionException
previous()
, if any,
but don't update my position.
NoSuchElementException
- when there is no previous Row
AxionException
- when a problem occurs accessing the Row
Row previous() throws NoSuchElementException, AxionException
Row
in the list, or throws
NoSuchElementException
if no next Row
exists.
NoSuchElementException
- when there is no next Row
AxionException
- when a problem occurs accessing the Row
int previousIndex()
previous()
row, if any, or -1 if we're add the
beginning of the list.
void remove() throws UnsupportedOperationException, AxionException
Row
at the current position in my underlying collection, or throw
UnsupportedOperationException
. (Optional operation.)
UnsupportedOperationException
AxionException
void reset() throws AxionException
RowIterator
to its initial state (positioned just
before the first Row
in the list).
AxionException
void set(Row row) throws UnsupportedOperationException, AxionException
Row
at the current position in my underlying collection, or throw
UnsupportedOperationException
. (Optional operation.)
UnsupportedOperationException
AxionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |