public interface ServiceIterator
ServiceIterator permits iteration over an ordered
list of Service objects. Applications may use the
ServiceIterator interface to browse a
ServiceList forward or backward.
Upon initial usage, hasPrevious() will return
false and nextService() will return the
first Service in the list, if present.
ServiceList| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Tests if there is a
Service in the next position in
the list. |
boolean |
hasPrevious()
Tests if there is a
Service in the previous
position in the list. |
Service |
nextService()
Reports the next
Service object in the list. |
Service |
previousService()
Reports the previous
Service object in the list. |
void |
toBeginning()
Resets the iterator to the beginning of the list, such that
hasPrevious() returns false and
nextService() returns the first Service
in the list (if the list is not empty). |
void |
toEnd()
Sets the iterator to the end of the list, such that
hasNext() returns false and
previousService() returns the last Service
in the list (if the list is not empty). |
void toBeginning()
hasPrevious() returns false and
nextService() returns the first Service
in the list (if the list is not empty).void toEnd()
hasNext() returns false and
previousService() returns the last Service
in the list (if the list is not empty).Service nextService()
Service object in the list. This
method may be called repeatedly to iterate through the list.Service object at the next position in
the list.NoSuchElementException - If the iteration has no next
Service.Service previousService()
Service object in the list.
This method may be called repeatedly to iterate through the list
in reverse order.Service object at the previous position
in the list.NoSuchElementException - If the iteration has no previous
Service.boolean hasNext()
Service in the next position in
the list.true if there is a Service in
the next position in the list; false otherwise.boolean hasPrevious()
Service in the previous
position in the list.true if there is a Service in
the previous position in the list; false otherwise.Copyright © 2012 code4tv.com. All Rights Reserved.