|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.util.TreeIterator.AbstractLevelIterator com.cc.framework.util.TreeIterator.SimpleLevelIterator
Iterator for simple Group Nodes
Field Summary | |
private TreeNodeDataModel |
currentChild
|
private int |
currentIndex
|
private TreeGroupDataModel |
parentNode
|
Constructor Summary | |
TreeIterator.SimpleLevelIterator(TreeIterator.LevelIterator parentIterator,
TreeGroupDataModel parentNode)
Constructor |
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private TreeGroupDataModel parentNode
private TreeNodeDataModel currentChild
private int currentIndex
Constructor Detail |
public TreeIterator.SimpleLevelIterator(TreeIterator.LevelIterator parentIterator, TreeGroupDataModel parentNode)
parentIterator
- The iterator for the parent tree levelparentNode
- The node which children should be iteratedMethod Detail |
public TreeNodeDataModel current()
TreeIterator.LevelIterator
TreeIterator.LevelIterator.current()
public int currentIndex()
TreeIterator.LevelIterator
TreeIterator.LevelIterator.currentIndex()
public void restart()
TreeIterator.LevelIterator
TreeIterator.LevelIterator.restart()
public 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()TreeIterator.LevelIterator.done()
public void next()
TreeIterator.LevelIterator
next()
call moves current to the next node.
TreeIterator.LevelIterator.next()
public int size()
TreeIterator.LevelIterator.size()
public TreeIterator.LevelIterator getParentIterator()
getParentIterator
in interface TreeIterator.LevelIterator
null
TreeIterator.LevelIterator.getParentIterator()
public java.lang.String currentKey()
TreeIterator.LevelIterator
currentKey
in interface TreeIterator.LevelIterator
TreeIterator.LevelIterator.currentKey()
public TreeIterator.LevelIterator currentIterator()
TreeIterator.LevelIterator
currentIterator
in interface TreeIterator.LevelIterator
null
when the selected element has no childrenTreeIterator.LevelIterator.currentIterator()
public int getDepth()
getDepth
in interface TreeIterator.LevelIterator
TreeIterator.LevelIterator.getDepth()
public int getMaxDepth()
getMaxDepth
in interface TreeIterator.LevelIterator
TreeIterator.LevelIterator.getMaxDepth()
public boolean hasChildren()
TreeIterator.LevelIterator
true
if current node has children and iterator
is allowed to traverse them.
hasChildren
in interface TreeIterator.LevelIterator
true
if current node has childrenTreeIterator.LevelIterator.hasChildren()
public boolean hasParent()
TreeIterator.LevelIterator
hasParent
in interface TreeIterator.LevelIterator
true
if there is a parent iterator availableTreeIterator.LevelIterator.hasParent()
public boolean isMaxDepth()
TreeIterator.LevelIterator
isMaxDepth
in interface TreeIterator.LevelIterator
true
when the maximum level is reachedTreeIterator.LevelIterator.isMaxDepth()
public void setMaxDepth(int maxDepth)
TreeIterator.LevelIterator
setMaxDepth
in interface TreeIterator.LevelIterator
maxDepth
- maximum depthTreeIterator.LevelIterator.setMaxDepth(int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |