Class RelativeMapPath

    • Constructor Detail

      • RelativeMapPath

        public RelativeMapPath()
        Creates a new instance.
      • RelativeMapPath

        public RelativeMapPath​(@NotNull
                               @NotNull RelativeMapPath 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
      • RelativeMapPath

        public RelativeMapPath​(@NotNull
                               @NotNull AbsoluteMapPath sourceMapPath,
                               @NotNull
                               @NotNull AbsoluteMapPath destinationMapPath)
        Creates a new instance as the difference between two absolute map paths.
        Parameters:
        sourceMapPath - the source map path to start from
        destinationMapPath - the destination map path to point to
    • 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 RelativeMapPath o)
        Specified by:
        compareTo in interface java.lang.Comparable<RelativeMapPath>
      • 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