 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.mapmodel;
22 import org.jetbrains.annotations.NotNull;
44 if (
string.startsWith(
"/")) {
58 if (!
string.startsWith(
"/")) {
59 throw new IllegalArgumentException(
"map path '" +
string +
"' is not absolute");
72 if (
string.startsWith(
"/")) {
73 throw new IllegalArgumentException(
"map path '" +
string +
"' is not relative");
97 return append(baseMapPath, mapPath.getPath());
109 final String tmpPath = result.
getPath();
110 if (!tmpPath.isEmpty() && !tmpPath.equals(
"..") && !tmpPath.endsWith(
"/..")) {
114 if (!path.isEmpty()) {
130 final String tmpPath = result.
getPath();
131 if (!tmpPath.isEmpty() && !tmpPath.equals(
"..") && !tmpPath.endsWith(
"/..")) {
135 if (!path.isEmpty()) {
MapPathUtils()
Private constructor to prevent instantiation.
String getPath()
Returns the map path information.
A MapPath that is absolute, that is, it starts with a "/".
static RelativeMapPath newRelativeMapPath(@NotNull final String string)
Creates a RelativeMapPath instance from string representation.
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
Utility class for MapPath related functions.
static AbsoluteMapPath append(@NotNull final AbsoluteMapPath mapPath, @NotNull final CharSequence string)
Appends a relative path to a MapPath.
static AbsoluteMapPath append(@NotNull final AbsoluteMapPath baseMapPath, @NotNull final MapPath mapPath)
Appends a map path to another map path.
static AbsoluteMapPath newAbsoluteMapPath(@NotNull final String string)
Creates an AbsoluteMapPath instance from string representation.
Represents a maps directory local map path.
Represents a maps directory local map path.
Pattern SEPARATOR
A Pattern to split a map path's string representation into components.
static RelativeMapPath append(@NotNull final RelativeMapPath mapPath, @NotNull final CharSequence string)
Appends a relative path to a MapPath.
String getPath()
Returns the map path information.
static RelativeMapPath append(@NotNull final RelativeMapPath baseMapPath, @NotNull final RelativeMapPath mapPath)
Appends a map path to another map path.