Class Path


  • public class Path
    extends Object
    Path represents the individual steps from the root object to the current property.
    Author:
    Jeff Schnitzer
    • Method Detail

      • root

        public static Path root()
      • toPathString

        public String toPathString()
        Create the full x.y.z string
      • getSegment

        public String getSegment()
        Get this segment of the path. For root this will be null.
      • getPrevious

        public Path getPrevious()
        Get the previous path; for root this will be null
      • isRoot

        public boolean isRoot()
      • equals

        public boolean equals​(Object obj)
        Compares on complete path
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Generates hash code for complete path
        Overrides:
        hashCode in class Object
      • throwIllegalState

        public Object throwIllegalState​(String message)
        Convenient way to include path location in the exception message. Never returns.
      • throwIllegalState

        public Object throwIllegalState​(String message,
                                        Throwable cause)
        Convenient way to include path location in the exception message. Never returns.
      • throwNullPointer

        public Object throwNullPointer​(String message)
        Convenient way to include path location in the exception message. Never returns.
      • depth

        public int depth()
        ROOT is 0, top level Entity properties are 1, embedded things are higher.