|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.model.TreePath
public class TreePath
A TreePath
stores the path of node in a tree.
It is stored as int array representing the selected row in the corresponding level.
eg:
[] empty array means tree path for the root page.
[1] the detail page for the row 1 of root page.
[1, 2] the detail page for the row 2 of the detail page for the row 1 of the root page.
Field Summary | |
---|---|
static TreePath |
EMPTY
Constant for an empty TreePath. |
Constructor Summary | |
---|---|
TreePath(int... pPath)
Constructs a new TreePath. |
Method Summary | |
---|---|
boolean |
containsAsParent(TreePath pTreePath)
Returns true, if the given tree path is a parent path of this tree path. |
boolean |
equals(java.lang.Object pObject)
|
int |
get(int pIndex)
Gets the value of given index. |
TreePath |
getChildPath(int... pArray)
Adds the given array to this TreePath . |
int |
getLast()
Gets the value of the last index. |
TreePath |
getParentPath()
Gets the parent tree path. |
TreePath |
getSubPath(int pLevel)
Returns the sub path from the position of the given level. |
int |
hashCode()
|
int |
length()
Gets the length of the array. |
TreePath |
set(int pIndex,
int pValue)
Sets the value of a given index. |
int[] |
toArray()
Gets a mutable array of this immutable array. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TreePath EMPTY
Constructor Detail |
---|
public TreePath(int... pPath)
pPath
- tree path.Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object pObject)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int length()
public int get(int pIndex)
pIndex
- the index.
public int getLast()
public TreePath getSubPath(int pLevel)
pLevel
- the start level.
public TreePath set(int pIndex, int pValue)
pIndex
- the index.pValue
- the value.
public TreePath getChildPath(int... pArray)
TreePath
.
pArray
- the array.
public TreePath getParentPath()
public boolean containsAsParent(TreePath pTreePath)
pTreePath
- the parent tree path.
public int[] toArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |