|
EASP API 7.8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistentIterator
An iterator over a sequence of Persistent objects. The iteration will always be in case-insensitive alphabetical order of the Persistent objects' display names.
The size of the iterator can be checked. A subsequence of the objects can be specified using one of the setBoundaries
methods. Doing so will reset the iterator such that it iterates over only the specified subsequence.
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if the iterator has a next element. |
Persistent |
next()
Returns the next element in the iteration. |
void |
setBoundaries(java.lang.String startName,
java.lang.String endName)
Resets the position of the iterator such that the object returned by the next call to next will be
the first Persistent object in the iteration sequence with a display name equal to or greater than startName . |
void |
setBoundaries(java.lang.String startName,
java.lang.String endName,
int compareStrength)
Resets the position of the iterator such that the object returned by the next call to next will be
the first Persistent object in the iteration sequence with a display name equal to or greater than startName . |
int |
size()
Returns the total number of elements in the iteration sequence. |
Method Detail |
---|
boolean hasNext()
Persistent next() throws java.util.NoSuchElementException, CommunicationException
java.util.NoSuchElementException
- Thrown if the iterator has already returned the last element.
CommunicationException
- Thrown if there is a problem communicating with the directory.void setBoundaries(java.lang.String startName, java.lang.String endName)
next
will be
the first Persistent object in the iteration sequence with a display name equal to or greater than startName
.
The iterator will
subsequently iterate over all Persistent objects in the iteration sequence that have a display name less than endName
.
The ordering of the objects is handled by a java.text.Collator
instance, after calling that
Collator's setStrength(java.text.Collator.PRIMARY)
method.
startName
- The starting display name (inclusive).endName
- The ending display name (exclusive).void setBoundaries(java.lang.String startName, java.lang.String endName, int compareStrength) throws CommunicationException
next
will be
the first Persistent object in the iteration sequence with a display name equal to or greater than startName
.
The iterator will
subsequently iterate over all Persistent objects in the iteration sequence that have a display name less than endName
.
The ordering of the objects is handled by a java.text.Collator
instance, after calling that
Collator's setStrength(compareStrength)
method.
startName
- The starting display name (inclusive).endName
- The ending display name (exclusive).compareStrength
- Must be one of Collator.PRIMARY, Collator.SECONDARY, or Collator.TERTIARY.
CommunicationException
- Thrown if there is a problem communicating with the directory.int size()
next
.
If one of the
setBoundaries
methods has been called previously, this method will return the number of elements
in the subsequence specified by that method call.
|
EASP API 7.8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |