Class PathImpl

  • All Implemented Interfaces:
    jakarta.validation.Path, Serializable, Iterable<jakarta.validation.Path.Node>

    public class PathImpl
    extends Object
    implements jakarta.validation.Path, Serializable
    Description: object holding the property path as a list of nodes. (Implementation partially based on reference implementation)
    This class is not synchronized.
    Version:
    $Rev: 1498347 $ $Date: 2013-07-01 12:06:18 +0200 (lun., 01 juil. 2013) $
    See Also:
    Serialized Form
    • 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. Note: This signature is to maintain pluggability with the RI impl.
        Parameters:
        propertyPath - the path as string representation.
        Returns:
        a Path instance representing the path described by the given string.
      • create

        public static PathImpl create()
        Create a PathImpl instance representing the specified path.
        Returns:
        PathImpl
      • copy

        public static PathImpl copy​(jakarta.validation.Path path)
        Copy another Path.
        Parameters:
        path -
        Returns:
        new PathImpl
      • of

        public static PathImpl of​(jakarta.validation.Path path)
      • isRootPath

        public boolean isRootPath()
        Learn whether this PathImpl points to the root of its graph.
        Returns:
        true if no child nodes
      • addNode

        public PathImpl addNode​(jakarta.validation.Path.Node node)
        Add a node to this PathImpl.
        Parameters:
        node - to add
        Returns:
        this, fluently
      • addProperty

        public PathImpl addProperty​(String name)
        Encapsulate the node manipulations needed to add a named property to this path.
        Parameters:
        name -
        Returns:
        this, fluently
      • iterator

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

        public boolean isSubPathOf​(jakarta.validation.Path path)
        Learn whether path is a parent to this.
        Parameters:
        path -
        Returns:
        true if our nodes begin with nodes equal to those found in path
      • toString

        public String toString()
        Specified by:
        toString in interface jakarta.validation.Path
        Overrides:
        toString in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object