|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataIterator
A DataIterator
provides next()
method for iterate through
a acyclic graph of Data objects.
A DataIterator
is different from a Iterator
in that
it's next()
method returns null
if there isn't a next
DataElement
, and it does not have a Iterator.hasNext()
method.
Unlike Iterator
, it has a skipToSibling()
to instruct
the DataIterator to skip to the next sibling.
Method Summary | |
---|---|
DataElement |
next()
Return a DataElement that represents the next Data object
in the graph. |
void |
skipToSibling()
Instruct the DataIterator to skip to the next sibling, i.e. |
Method Detail |
---|
DataElement next()
DataElement
that represents the next Data object
in the graph.
Unlike Iterator.next()
this method returns null if there isn't
a next Data object, and it does not throw a
NoSuchElementException
. The DataElement
returned is valid until next()
is called again. In others
words, the next call to next()
may invalidate or change
the returned DataElement
or its ancestors.
DataElement
that represents the next Data object or
return null if there isn't a next DataElement
.void skipToSibling()
next()
should return a sibling of
the last Data object visited and returned by the last
invocation of next()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |