Interface MapPath

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    AbsoluteMapPath, RelativeMapPath

    public interface MapPath
    extends java.io.Serializable
    Represents a maps directory local map path.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static @NotNull java.util.regex.Pattern SEPARATOR
      A Pattern to split a map path's string representation into components.
    • Field Detail

      • SEPARATOR

        @NotNull
        static final @NotNull java.util.regex.Pattern SEPARATOR
        A Pattern to split a map path's string representation into components.
    • Method Detail

      • getPath

        @NotNull
        @NotNull java.lang.String getPath()
        Returns the map path information.
        Returns:
        the map path information; it does not include a leading "/" for absolute paths
      • getMapComponent

        @Nullable
        @Nullable java.lang.String getMapComponent()
        Returns the initial path component of a map path. "/path/to/map" returns "path", "/map" returns null. Relative map paths always return null.
        Returns:
        the initial path component
      • getRelativeMapPathFrom

        @NotNull
        @NotNull RelativeMapPath getRelativeMapPathFrom​(@NotNull
                                                        @NotNull AbsoluteMapPath mapPath)
        Returns this map path relative to another map path.
        Parameters:
        mapPath - the other map path
        Returns:
        the relative map path from this map path to the other map path