Package com.sun.javatest.util
Class HelpTree.Node
java.lang.Object
com.sun.javatest.util.HelpTree.Node
- Enclosing class:
HelpTree
A node within a HelpTree. A node has a name, a description,
and zero or more child nodes.
-
Constructor Summary
ConstructorsConstructorDescriptionNode
(I18NResourceBundle i18n, String prefix) Create a node, with no children.Node
(I18NResourceBundle i18n, String prefix, HelpTree.Node... children) Create a node, with given children.Node
(I18NResourceBundle i18n, String prefix, String... entries) Create a node and its children.Create a node, with no children.Node
(String name, String description, HelpTree.Node... children) Create a node, with given children. -
Method Summary
-
Constructor Details
-
Node
Create a node, with no children.- Parameters:
name
- the name for the nodedescription
- the description for the node
-
Node
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
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
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
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 Details
-
getName
Get the name of this node.- Returns:
- the name of this node
-
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
Get a specified child of this node.- Parameters:
i
- the index of the desired child- Returns:
- the specified child of this node
-