Class HelpTree.Node

java.lang.Object
com.sun.javatest.util.HelpTree.Node
Enclosing class:
HelpTree

public static class HelpTree.Node extends Object
A node within a HelpTree. A node has a name, a description, and zero or more child nodes.
  • Constructor Details

    • Node

      public Node(String name, String description)
      Create a node, with no children.
      Parameters:
      name - the name for the node
      description - the description for the node
    • Node

      public Node(String name, String description, HelpTree.Node... children)
      Create a node, with given children.
      Parameters:
      name - the name for the node
      description - the description for the node
      children - the child nodes for the node
    • Node

      public Node(I18NResourceBundle i18n, 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, 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, String prefix, 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 Details

    • getName

      public final String getName()
      Get the name of this node.
      Returns:
      the name of this node
    • getDescription

      public final 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