Package com.sun.javatest.util
Class HelpTree.Node
- java.lang.Object
-
- com.sun.javatest.util.HelpTree.Node
-
- Enclosing class:
- HelpTree
public static class HelpTree.Node extends java.lang.Object
A node within a HelpTree. A node has a name, a description, and zero or more child nodes.
-
-
Constructor Summary
Constructors Constructor Description Node(I18NResourceBundle i18n, java.lang.String prefix)
Create a node, with no children.Node(I18NResourceBundle i18n, java.lang.String prefix, HelpTree.Node[] children)
Create a node, with given children.Node(I18NResourceBundle i18n, java.lang.String prefix, java.lang.String[] entries)
Create a node and its children.Node(java.lang.String name, java.lang.String description)
Create a node, with no children.Node(java.lang.String name, java.lang.String description, HelpTree.Node[] children)
Create a node, with given children.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HelpTree.Node
getChild(int i)
Get a specified child of this node.int
getChildCount()
Get the number of children of this node.java.lang.String
getDescription()
Get the description of this node.java.lang.String
getName()
Get the name of this node.
-
-
-
Constructor Detail
-
Node
public Node(java.lang.String name, java.lang.String description)
Create a node, with no children.- Parameters:
name
- the name for the nodedescription
- the description for the node
-
Node
public Node(java.lang.String name, java.lang.String description, HelpTree.Node[] children)
Create a node, with given children.- Parameters:
name
- the name for the nodedescription
- the description for the nodechildren
- the child nodes for the node
-
Node
public Node(I18NResourceBundle i18n, java.lang.String prefix)
Create a node, with no children. The name and description are obtained from a resource bundle, using keys based on a common prefix. The key for the name will be prefix.name and the key for the description will be prefix.desc.- Parameters:
i18n
- the resource bundle from which to obtain the name and description for the node.prefix
- the prefix for the names of the name and description entries in the resource bundle.
-
Node
public Node(I18NResourceBundle i18n, java.lang.String prefix, HelpTree.Node[] children)
Create a node, with given children. The name and description are obtained from a resource bundle, using keys based on a common prefix. The key for the name will be prefix.name and the key for the description will be prefix.desc.- Parameters:
i18n
- the resource bundle from which to obtain the name and description for the node.prefix
- the prefix for the names of the name and description entries in the resource bundle.children
- the child nodes for this node
-
Node
public Node(I18NResourceBundle i18n, java.lang.String prefix, java.lang.String[] entries)
Create a node and its children. The name and description are obtained from a resource bundle, using keys based on a common prefix. The key for the name will be prefix.name and the key for the description will be prefix.desc. The children will each be created with no children of their own, using a prefix of prefix.entry.- Parameters:
i18n
- the resource bundle from which to obtain the name and description for the node.prefix
- the prefix for the names of the name and description entries in the resource bundle.entries
- the array of entry names used to create the child nodes.
-
-
Method Detail
-
getName
public final java.lang.String getName()
Get the name of this node.- Returns:
- the name of this node
-
getDescription
public final java.lang.String getDescription()
Get the description of this node.- Returns:
- the description of this node
-
getChildCount
public int getChildCount()
Get the number of children of this node.- Returns:
- the number of children of this node
-
getChild
public HelpTree.Node getChild(int i)
Get a specified child of this node.- Parameters:
i
- the index of the desired child- Returns:
- the specified child of this node
-
-