|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.jsr303.util.PathImpl
public class PathImpl
Description: object holding the property path as a list of nodes.
(Implementation partially based on reference implementation)
This class is not synchronized.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface javax.validation.Path |
---|
Path.Node |
Field Summary | |
---|---|
(package private) static String |
PROPERTY_PATH_SEPARATOR
|
Method Summary | |
---|---|
void |
addNode(Path.Node node)
Add a node to this PathImpl . |
void |
addProperty(String name)
Encapsulate the node manipulations needed to add a named property to this path. |
static PathImpl |
copy(Path path)
Copy another Path. |
static PathImpl |
create(String name)
Create a PathImpl instance representing the specified path. |
static PathImpl |
createPathFromString(String propertyPath)
Returns a Path instance representing the path described by the given string. |
boolean |
equals(Object o)
|
NodeImpl |
getLeafNode()
Get the leaf node (if any) from this PathImpl |
PathImpl |
getPathWithoutLeafNode()
Return a new PathImpl that represents this minus its leaf node (if present). |
int |
hashCode()
|
boolean |
isRootPath()
Learn whether this PathImpl points to the root of its graph. |
boolean |
isSubPathOf(Path path)
Learn whether path is a parent to this . |
Iterator<Path.Node> |
iterator()
|
Path.Node |
removeLeafNode()
Trim the leaf node from this PathImpl . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final String PROPERTY_PATH_SEPARATOR
Method Detail |
---|
public static PathImpl createPathFromString(String propertyPath)
Path
instance representing the path described by the given string. To create a root node the
empty string should be passed. Note: This signature is to maintain pluggability with the RI impl.
propertyPath
- the path as string representation.
Path
instance representing the path described by the given string.public static PathImpl create(String name)
PathImpl
instance representing the specified path.
name
-
public static PathImpl copy(Path path)
path
-
PathImpl
public boolean isRootPath()
PathImpl
points to the root of its graph.
public PathImpl getPathWithoutLeafNode()
PathImpl
that represents this
minus its leaf node (if present).
public void addNode(Path.Node node)
PathImpl
.
node
- to addpublic void addProperty(String name)
name
- public Path.Node removeLeafNode()
PathImpl
.
IllegalStateException
- if no nodes are foundpublic NodeImpl getLeafNode()
PathImpl
NodeImpl
public Iterator<Path.Node> iterator()
iterator
in interface Iterable<Path.Node>
public boolean isSubPathOf(Path path)
path
is a parent to this
.
path
-
true
if our nodes begin with nodes equal to those found in path
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |