|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Supports persistent iteration over arbitrary content. This iterator can be
serialized, deserialized, and used to continue iteration. The target content
is not persisted, and the caller must check whether it is still available by
calling hasContent()
, and restore the original content if necessary
by calling setContent(java.lang.Object)
.
Method Summary | |
boolean |
hasContent()
Checks whether the target content is available. |
boolean |
isModified()
Returns whether the iterator has changed since it was created or last deserialized. |
void |
reset()
Resets the iterator, clearing the content, index and internal fields. |
void |
setContent(java.lang.Object content)
Sets the content over which to iterate (or continue iteration). |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
Method Detail |
public boolean hasContent()
setContent(java.lang.Object)
before continuing iteration over a
deserialized instance of this class.
true
if the content is available.public boolean isModified()
Iterator.next()
, reset()
,
and setContent(java.lang.Object)
, and cleared only be serialization. The flag
indicates that the iterator's persistent state needs to be updated.
true
if the iterator has changed.public void reset()
setContent(java.lang.Object)
before
it can be used to perform further iterations. This method sets the
modified flag
.
public void setContent(java.lang.Object content)
modified flag
.
content
- The target array.
java.lang.IllegalArgumentException
- if the object is not of the expected
class.
java.util.ConcurrentModificationException
- if the content has
changed since it was first set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |