org.apache.tapestry5.tree

## Interface TreeNode<T>

- Type Parameters:
    `T` - type of node

      public interface TreeNode<T>

  A node within a `TreeModel`. In a `DefaultTreeModel`, most of the node's information comes via the `TreeModelAdapter`.
  Since:
    5.3

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<TreeNode<T>>` | `getChildren()` Returns the actual children of this non-leaf node, as additional nodes.
    `boolean` | `getHasChildren()` Returns true if this non-leaf node has child nodes.
    `String` | `getId()` Returns a string Id for the node that uniquely identifies it.
    `String` | `getLabel()` Returns a textual label for the node.
    `T` | `getValue()` Returns the value represented by this node.
    `boolean` | `isLeaf()` If true, then this node is a leaf node, which never has children (i.e., a file).

- - ### Method Detail

    - #### getId

          String getId()

      Returns a string Id for the node that uniquely identifies it.
      Returns:
        unique string identifying the node
      See Also:
        `TreeModel.getById(String)`

    - #### getValue

          T getValue()

      Returns the value represented by this node.

    - #### isLeaf

          boolean isLeaf()

      If true, then this node is a leaf node, which never has children (i.e., a file). If false, the node may have children (i.e., a folder).
      Returns:
        true for leaf nodes, false for folder nodes
      See Also:
        `TreeModelAdapter.isLeaf(Object)`

    - #### getHasChildren

          boolean getHasChildren()

      Returns true if this non-leaf node has child nodes. This will not be invoked for leaf nodes.
      See Also:
        `TreeModelAdapter.hasChildren(Object)`

    - #### getChildren

          List<TreeNode<T>> getChildren()

      Returns the actual children of this non-leaf node, as additional nodes.
      See Also:
        `TreeModelAdapter.getChildren(Object)`

    - #### getLabel

          String getLabel()

      Returns a textual label for the node. Not all UIs will make use of the label, but default UIs will.
      See Also:
        `TreeModelAdapter.getLabel(Object)`

${project.version} - Copyright © 2003-2014 The Apache Software Foundation.