|
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.LightIterator<E>
public class LightIterator<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.
| Constructor Summary | |
|---|---|
LightIterator(EntityManager em,
Collection<E> name,
boolean primitive)
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements, so that a next method will return an element. |
boolean |
hasPrevious()
Returns true if the iteration has more elements, so that a back method 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(E 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. |
java.lang.String |
toString()
Return the value when an object instance is displayed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LightIterator(EntityManager em,
Collection<E> name,
boolean primitive)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic 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(E 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 | ||||||||