org.hibernate.validator.engine
Class PathImpl

java.lang.Object
  extended by org.hibernate.validator.engine.PathImpl
All Implemented Interfaces:
Serializable, Iterable<javax.validation.Path.Node>, javax.validation.Path

public class PathImpl
extends Object
implements javax.validation.Path, Serializable

Author:
Hardy Ferentschik
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.Path
javax.validation.Path.Node
 
Method Summary
 void addNode(javax.validation.Path.Node node)
           
static PathImpl createNewPath(String name)
           
static PathImpl createPathFromString(String propertyPath)
          Returns a Path instance representing the path described by the given string.
static PathImpl createShallowCopy(javax.validation.Path path)
           
 boolean equals(Object o)
           
 NodeImpl getLeafNode()
           
 PathImpl getPathWithoutLeafNode()
           
 int hashCode()
           
 boolean isRootPath()
           
 boolean isSubPathOf(javax.validation.Path path)
           
 Iterator<javax.validation.Path.Node> iterator()
           
 javax.validation.Path.Node removeLeafNode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

createPathFromString

public static PathImpl createPathFromString(String propertyPath)
Returns a Path instance representing the path described by the given string. To create a root node the empty string should be passed.

Parameters:
propertyPath - the path as string representation.
Returns:
a Path instance representing the path described by the given string.
Throws:
IllegalArgumentException - in case property == null or property cannot be parsed.

createNewPath

public static PathImpl createNewPath(String name)

createShallowCopy

public static PathImpl createShallowCopy(javax.validation.Path path)

isRootPath

public boolean isRootPath()

getPathWithoutLeafNode

public PathImpl getPathWithoutLeafNode()

addNode

public void addNode(javax.validation.Path.Node node)

removeLeafNode

public javax.validation.Path.Node removeLeafNode()

getLeafNode

public NodeImpl getLeafNode()

iterator

public Iterator<javax.validation.Path.Node> iterator()
Specified by:
iterator in interface Iterable<javax.validation.Path.Node>

isSubPathOf

public boolean isSubPathOf(javax.validation.Path path)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 Oracle Corporation. All Rights Reserved.