Class AbsolutePath<T>

  • All Implemented Interfaces:
    java.lang.Iterable<Segment<T>>

    public final class AbsolutePath<T>
    extends Path<T>
    A path that begins with a '/' - typically representing a path relative to root.

    To create instances, see Path.

    • Method Detail

      • isAbsolute

        public boolean isAbsolute()
        Description copied from class: Path
        Indicates whether this path is absolute (begins with '/') or not.
        Specified by:
        isAbsolute in class Path<T>
        Returns:
        whether this path is absolute (begins with '/') or not.
      • segments

        public java.util.List<Segment<T>> segments()
        Description copied from class: Path
        Returns the list of Segments that this path represents. Note that this List contains the same elements as returned by calling iterator() on this.
        Specified by:
        segments in class Path<T>
        Returns:
        the list of Segments that this path represents.
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • iterator

        public java.util.Iterator<Segment<T>> iterator()