|
|||||||||||
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
Base class for all LevelIterator's
Field Summary | |
private int |
depth
|
private int |
maxDepth
|
private TreeIterator.LevelIterator |
parentIterator
|
Constructor Summary | |
TreeIterator.AbstractLevelIterator(TreeIterator.LevelIterator parentIterator)
Constructor |
Method Summary | |
TreeIterator.LevelIterator |
currentIterator()
Returns the LevelIterator for the current selected element. |
java.lang.String |
currentKey()
Returns key of the of the current node. |
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 |
setMaxDepth(int maxDepth)
Sets the maximum depth the iterator is allowed to descent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.cc.framework.util.TreeIterator.LevelIterator |
current, currentIndex, done, next, restart, size |
Field Detail |
private TreeIterator.LevelIterator parentIterator
private int depth
private int maxDepth
Constructor Detail |
public TreeIterator.AbstractLevelIterator(TreeIterator.LevelIterator parentIterator)
parentIterator
- The iterator for the parent tree levelMethod Detail |
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 |