|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Iterator for one level in a tree structure
Method Summary | |
TreeNodeDataModel |
current()
Returns the current node. |
int |
currentIndex()
Returns index of the of the current node among siblings. |
TreeIterator.LevelIterator |
currentIterator()
Returns the LevelIterator for the current selected element. |
java.lang.String |
currentKey()
Returns key of the of the current node. |
boolean |
done()
|
int |
getDepth()
|
int |
getMaxDepth()
|
TreeIterator.LevelIterator |
getParentIterator()
|
boolean |
hasChildren()
Returns true if current node has children and iterator
is allowed to traverse them. |
boolean |
hasParent()
Checks if there is a parent iterator available |
boolean |
isMaxDepth()
Checks if the iterator has reached the maximum tree level |
void |
next()
Every next() call moves current to the next node. |
void |
restart()
Restarts the iterator on the first element |
void |
setMaxDepth(int maxDepth)
Sets the maximum depth the iterator is allowed to descent. |
int |
size()
|
Method Detail |
public TreeIterator.LevelIterator getParentIterator()
null
public void restart()
public TreeNodeDataModel current()
public java.lang.String currentKey()
public int currentIndex()
public boolean hasParent()
true
if there is a parent iterator availablepublic boolean hasChildren()
true
if current node has children and iterator
is allowed to traverse them.
true
if current node has childrenpublic boolean done()
true
when the iterator has reached the
last element of the iteration. after done() has returned
true
it is not valid to call current()public void next()
next()
call moves current to the next node.
public TreeIterator.LevelIterator currentIterator()
null
when the selected element has no childrenpublic int getDepth()
public int getMaxDepth()
public int size()
public void setMaxDepth(int maxDepth)
maxDepth
- maximum depthpublic boolean isMaxDepth()
true
when the maximum level is reached
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |