|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.forms.formmodel.tree.TreePath
public class TreePath
A path in a TreeModel
.
Field Summary | |
---|---|
static TreePath |
ROOT_PATH
|
Constructor Summary | |
---|---|
TreePath(String key)
Constructs a TreePath containing only a single element. |
|
TreePath(TreePath parent,
String key)
Constructs a new TreePath, which is the path identified by parent ending in lastElement . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Tests if two paths are equal. |
String |
getLastKey()
Returns the key of last element of this path. |
Object |
getLastPathObject(TreeModel model)
Returns the last component of this path. |
Object |
getObject(TreeModel model)
|
Object[] |
getObjectPath(TreeModel model)
Returns an ordered array of Objects containing the components of this TreePath. |
TreePath |
getParentPath()
Returns a path containing all the elements of this object, except the last path component. |
int |
getPathCount()
Returns the number of elements in the path. |
int |
hashCode()
|
boolean |
isDescendant(TreePath aTreePath)
Returns true if aTreePath is a descendant of this
TreePath. |
String |
toString()
Returns a string that displays and identifies this object's properties. |
static TreePath |
valueOf(String s)
Returns the TreePath represented by a given String. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TreePath ROOT_PATH
Constructor Detail |
---|
public TreePath(String key)
public TreePath(TreePath parent, String key)
parent
ending in lastElement
.
Method Detail |
---|
public Object[] getObjectPath(TreeModel model)
TreePath()
public Object getLastPathObject(TreeModel model)
TreePath()
public int getPathCount()
public boolean equals(Object obj)
equals
in class Object
obj
- the object ot comparepublic int hashCode()
hashCode
in class Object
public boolean isDescendant(TreePath aTreePath)
aTreePath
is a descendant of this
TreePath. A TreePath P1 is a descendent of a TreePath P2 if P1 contains
all of the components that make up P2's path. For example, if this object
has the path [a, b], and aTreePath
has the path [a, b, c],
then aTreePath
is a descendant of this object. However, if
aTreePath
has the path [a], then it is not a descendant of
this object.
aTreePath
is a descendant of this pathpublic TreePath getParentPath()
public String getLastKey()
public String toString()
toString
in class Object
public static TreePath valueOf(String s)
TreePath
represented by a given String.
s
- the string representation of the path
toString()
public Object getObject(TreeModel model)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |