public class

TreePath

extends Object
implements Serializable
java.lang.Object
   ↳ org.apache.myfaces.tobago.model.TreePath

Class Overview

Handles a path in a tree from the root node to the position inside this tree. The position of the root node is dropped in the list, because it would always be zero. The path of the root node as length 0.

Example:

  + Root               Path: []
  |
  +-+ Node             Path: [0]
  | |
  | +-+ Sub-Node       Path: [0, 0]
  | |
  | +-+ Sub-Node       Path: [0, 1]
  |
  +-+ Node             Path: [1]
    |
    +-+ Sub-Node       Path: [1, 0]
    |
    +-+ Sub-Node       Path: [1, 1]
    |
    +-+ Sub-Node       Path: [1, 2]
 

Summary

Public Constructors
TreePath(int... path)
TreePath(String string)
This constructor is deprecated. since 1.6.0
TreePath(List<Integer> pathList)
TreePath(TreeNode node)
TreePath(TreePath position, int addendum)
This constructor is deprecated. since 1.6.0
Public Methods
boolean equals(Object o)
int getLength()
DefaultMutableTreeNode getNode(DefaultMutableTreeNode tree)
This method is deprecated. since 1.6.0
String getParentPathString()
This method is deprecated. since 1.5.0
int[] getPath()
String getPathString()
This method is deprecated. since 1.6.0
int hashCode()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TreePath (int... path)

public TreePath (String string)

This constructor is deprecated.
since 1.6.0

public TreePath (List<Integer> pathList)

public TreePath (TreeNode node)

public TreePath (TreePath position, int addendum)

This constructor is deprecated.
since 1.6.0

Public Methods

public boolean equals (Object o)

public int getLength ()

public DefaultMutableTreeNode getNode (DefaultMutableTreeNode tree)

This method is deprecated.
since 1.6.0

Returns the node at the position of this NodePath applied to the parameter node.

Parameters
tree The start node.
Returns
  • The node applied to the given path.

public String getParentPathString ()

This method is deprecated.
since 1.5.0

public int[] getPath ()

public String getPathString ()

This method is deprecated.
since 1.6.0

public int hashCode ()

public String toString ()