Class AbsoluteMapPath

    • Constructor Detail

      • AbsoluteMapPath

        public AbsoluteMapPath()
        Creates a new instance.
      • AbsoluteMapPath

        public AbsoluteMapPath​(@NotNull
                               @NotNull AbsoluteMapPath parent,
                               @NotNull
                               @NotNull java.lang.String name)
        Creates a new map path based on a parent map path.
        Parameters:
        parent - the parent map path
        name - the name of the child; "." or ".." are allowed
    • Method Detail

      • getPath

        @NotNull
        public @NotNull java.lang.String getPath()
        Description copied from interface: MapPath
        Returns the map path information.
        Specified by:
        getPath in interface MapPath
        Returns:
        the map path information; it does not include a leading "/" for absolute paths
      • getMapComponent

        @Nullable
        public @Nullable java.lang.String getMapComponent()
        Description copied from interface: MapPath
        Returns the initial path component of a map path. "/path/to/map" returns "path", "/map" returns null. Relative map paths always return null.
        Specified by:
        getMapComponent in interface MapPath
        Returns:
        the initial path component
      • getRelativeMapPathFrom

        @NotNull
        public @NotNull RelativeMapPath getRelativeMapPathFrom​(@NotNull
                                                               @NotNull AbsoluteMapPath mapPath)
        Description copied from interface: MapPath
        Returns this map path relative to another map path.
        Specified by:
        getRelativeMapPathFrom in interface MapPath
        Parameters:
        mapPath - the other map path
        Returns:
        the relative map path from this map path to the other map path
      • compareTo

        public int compareTo​(@NotNull
                             @NotNull AbsoluteMapPath o)
        Specified by:
        compareTo in interface java.lang.Comparable<AbsoluteMapPath>
      • equals

        public boolean equals​(@Nullable
                              @Nullable java.lang.Object obj)
        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