Class ResourcePath

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ResourcePath
    extends java.lang.Object
    implements java.io.Serializable
    A file or folder path.
    See Also:
    Serialized Form
    • Constructor Detail

      • ResourcePath

        public ResourcePath()
        Create a new root path instance.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the path element.
        Returns:
        the name
      • toString

        public java.lang.String toString()
        Returns the full path value.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the path value
      • toStringRelativeTo

        public java.lang.String toStringRelativeTo​(java.lang.String source)
      • toStringRelativeTo

        public java.lang.String toStringRelativeTo​(ResourcePath source)
      • get

        public ResourcePath get​(java.lang.String path)
        Get a new path relative to this one.
        Parameters:
        path - the path to obtain.
        Returns:
        a new path
      • getParent

        public ResourcePath getParent()
        Returns the parent of the path or null if this is a root path.
        Returns:
        the parent or null
      • isRootPath

        public boolean isRootPath()
        Returns true if this path is a root path.
        Returns:
        if this is a root path
      • append

        public ResourcePath append​(ResourcePath path)
        Append the given path to this path
        Parameters:
        path - the path to append
        Returns:
        a new path
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object