|
JADE Java Persistence API 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jadeworld.jade.rootschema.Object
com.jadeworld.jade.rootschema.Iterator<E>
public class Iterator<E>
The Iterator class encapsulates the behavior required to sequentially access elements of a collection. Instances of the Iterator class are referred to as iterators. Use iterators to iterate two or more collections where the iterations are not nested or when the state of an iteration (that is, the position in a collection) needs to be remembered and the iteration resumed later. (The foreach instruction enables you to iterate through two collections simultaneously only if one iteration is nested within the other.) previous and hasPrevious are JADE extensions of Iterator based on ListIterator.
| Field Summary |
|---|
| Fields inherited from class com.jadeworld.jade.rootschema.Object |
|---|
oid |
| Constructor Summary | |
|---|---|
Iterator()
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements, so that a next will return an element. |
boolean |
hasPrevious()
Returns true if the iteration has more elements, so that a back will return an element. |
E |
next()
Accesses successive entries one at a time in the collection to which the iteration is attached. |
E |
previous()
Accesses successive entries one at a time in reverse order in the collection to which the iteration is attached. |
void |
remove()
Not yet implemented |
void |
reset()
Restarts an iteration. |
void |
startAtIndex(int index)
Sets the starting position of the iterator in the attached collection to a relative index. |
void |
startAtObject(Object object)
Sets the starting position of the iterator in the attached collection at the position of the object specified in the object parameter. |
void |
startNearIndex(int index)
Sets the starting position of the iterator in the attached collection approximate to a relative index. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Iterator()
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<E>public E next()
next in interface java.util.Iterator<E>public void remove()
remove in interface java.util.Iterator<E>public void reset()
JADE-only method.
public boolean hasPrevious()
JADE-only method.
public E previous()
JADE-only method.
public void startAtIndex(int index)
JADE-only method.
index - The relative index in the collection at which to start.public void startAtObject(Object object)
JADE-only method.
object - The object whose location in the collection determines the start position.public void startNearIndex(int index)
JADE-only method.
index - The relative index in the collection at which to start.
|
JADE Java Persistence API 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||