Package org.apache.tapestry5.tree

## Interface TreeModelAdapter<T>

-     public interface TreeModelAdapter<T>

  Used with `DefaultTreeModel` to define how to extract labels and child nodes from a value.
  Since:
    5.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<T>` | `getChildren​(T value)` | Returns the children, in the order they should be presented to the client.
    `java.lang.String` | `getLabel​(T value)` | Returns a text label for the value, which may be presented to the client.
    `boolean` | `hasChildren​(T value)` | Returns true if the value has children (only invoked for non-leaf values).
    `boolean` | `isLeaf​(T value)` | Determines if the value is a leaf or a (potential) container of children.

- - ### Method Detail

    - #### isLeaf

          boolean isLeaf​(T value)

      Determines if the value is a leaf or a (potential) container of children.
      See Also:
        `TreeNode.isLeaf()`

    - #### hasChildren

          boolean hasChildren​(T value)

      Returns true if the value has children (only invoked for non-leaf values).
      See Also:
        `TreeNode.getHasChildren()`

    - #### getChildren

          java.util.List<T> getChildren​(T value)

      Returns the children, in the order they should be presented to the client. This should return the childen in the correct presentation or, or return null or an empty list.
      See Also:
        `TreeNode.getChildren()`

    - #### getLabel

          java.lang.String getLabel​(T value)

      Returns a text label for the value, which may be presented to the client.
      See Also:
        `TreeNode.getLabel()`