ViewIterator Interface
- public interface ViewIterator
A ViewIterator
is an iterator over large result sets that are
broken into a series of View
s.
Related Topics
View
-
All Known Implementing Classes
-
CatalogItemIterator
public View |
-
getCurrentView ()
- Returns the current view.
|
public View |
-
getViewAt (int index)
- Gets the view at the specified index.
|
public int |
-
getViewCount ()
- Returns the number of views spanned by this iterator.
|
public void |
-
gotoNextView ()
- Moves the iterator to the next view.
|
public void |
-
gotoPreviousView ()
- Moves the iterator to the previous view.
|
public void |
-
gotoViewAt (int index)
- Moves the iterator to the view at the specified index.
|
public boolean |
-
hasNext ()
- Returns
true if the iterator has more elements.
|
public boolean |
-
hasNextView ()
- Returns
true if the iterator has a next view.
|
public boolean |
-
hasPreviousView ()
- Returns
true if the iterator has a previous view.
|
public Object |
-
next ()
- Returns the next element in the iteration.
|
public int |
-
size ()
- Returns the number of objects over which the iterator spans.
|
getCurrentView() Method
public View
getCurrentView()
Returns the current view.
Returns
- The current view.
getViewAt(int) Method
public View
getViewAt(int index)
throws IndexOutOfBoundsException
Gets the view at the specified index.
Parameters
-
index
- The index of the desired view.
Returns
- The view at the specified index.
Exceptions
-
IndexOutOfBoundsException
- if the index is invalid.
getViewCount() Method
public int getViewCount()
Returns the number of views spanned by this iterator.
Returns
- the number of views spanned by this iterator.
gotoNextView() Method
public void gotoNextView()
throws NoSuchViewException
Moves the iterator to the next view.
Exceptions
-
NoSuchViewException
- if the iterator does not have a next view.
gotoPreviousView() Method
public void gotoPreviousView()
throws NoSuchViewException
Moves the iterator to the previous view.
Exceptions
-
NoSuchViewException
- if the iterator does not have a previous view.
gotoViewAt(int) Method
public void gotoViewAt(int index)
throws NoSuchViewException
Moves the iterator to the view at the specified index.
Parameters
-
index
- The index of the desired view.
Exceptions
-
NoSuchViewException
- if the index is invalid.
hasNext() Method
public boolean hasNext()
Returns true
if the iterator has more elements.
Returns
true
if the iterator has more elements.
hasNextView() Method
public boolean hasNextView()
Returns true
if the iterator has a next view.
Returns
true
if the iterator has a next view.
hasPreviousView() Method
public boolean hasPreviousView()
Returns true
if the iterator has a previous view.
Returns
true
if the iterator has a previous view.
next() Method
public Object
next()
throws NoSuchElementException
, RemoteException
Returns the next element in the iteration.
Returns
- the next element in the iteration.
Exceptions
-
NoSuchElementException
- if the iteration has no more elements.
-
RemoteException
size() Method
public int size()
Returns the number of objects over which the iterator spans.
This number is guaranteed to only be accurate at the time of
iterator creation.
Returns
- The number of spanned objects.