org.codehaus.mojo.pomtools.helpers
Class TreeNode
java.lang.Object
org.codehaus.mojo.pomtools.helpers.TreeNode
public class TreeNode
- extends Object
Used for representing and printing a hierarchy of objects.
- Version:
- $Id: TreeNode.java 2166 2006-07-18 21:32:16Z carlos $
- Author:
- David Hawkins
NEWLINE
protected static final String NEWLINE
- See Also:
- Constant Field Values
MAX_DEPTH
protected static final int MAX_DEPTH
- See Also:
- Constant Field Values
DEFAULT_STRINGIFIER
public static final TreeNode.Stringifier DEFAULT_STRINGIFIER
TreeNode
public TreeNode(Object id)
TreeNode
public TreeNode(Object id,
Comparator comparator)
TreeNode
public TreeNode(Object id,
Comparator comparator,
TreeNode parent)
getComparator
protected Comparator getComparator()
containsChild
public boolean containsChild(Object id)
addChild
public TreeNode addChild(Object id)
getParent
public TreeNode getParent()
getSingleChild
public TreeNode getSingleChild()
getChildren
public List getChildren()
getId
public Object getId()
hasChildren
public boolean hasChildren()
toString
public String toString()
- Overrides:
toString
in class Object
toString
public String toString(TreeNode.Stringifier stringifier)
printNode
protected void printNode(TreeNode.Stringifier stringifier,
TreeNode tree,
StringBuffer sb,
int depth,
boolean[] hasMore)
Copyright © 2011 The Codehaus. All Rights Reserved.