public class RelativeMapPath extends java.lang.Object implements java.lang.Comparable<RelativeMapPath>, MapPath
Constructor and Description |
---|
RelativeMapPath()
Creates a new instance.
|
RelativeMapPath(@NotNull AbsoluteMapPath sourceMapPath,
@NotNull AbsoluteMapPath destinationMapPath)
Creates a new instance as the difference between two absolute map paths.
|
RelativeMapPath(@NotNull RelativeMapPath parent,
@NotNull java.lang.String name)
Creates a new map path based on a parent map path.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(@NotNull RelativeMapPath o) |
boolean |
equals(@Nullable java.lang.Object obj) |
@Nullable java.lang.String |
getMapComponent()
Returns the initial path component of a map path.
|
@NotNull java.lang.String |
getPath()
Returns the map path information.
|
@NotNull RelativeMapPath |
getRelativeMapPathFrom(@NotNull AbsoluteMapPath mapPath)
Returns this map path relative to another map path.
|
int |
hashCode() |
java.lang.String |
toString() |
public RelativeMapPath()
public RelativeMapPath(@NotNull @NotNull RelativeMapPath parent, @NotNull @NotNull java.lang.String name)
parent
- the parent map pathname
- the name of the child; "." or ".." are allowedpublic RelativeMapPath(@NotNull @NotNull AbsoluteMapPath sourceMapPath, @NotNull @NotNull AbsoluteMapPath destinationMapPath)
sourceMapPath
- the source map path to start fromdestinationMapPath
- the destination map path to point to@NotNull public @NotNull java.lang.String getPath()
MapPath
@Nullable public @Nullable java.lang.String getMapComponent()
MapPath
null
. Relative map paths always return
null
.getMapComponent
in interface MapPath
@NotNull public @NotNull RelativeMapPath getRelativeMapPathFrom(@NotNull @NotNull AbsoluteMapPath mapPath)
MapPath
getRelativeMapPathFrom
in interface MapPath
mapPath
- the other map pathpublic int compareTo(@NotNull @NotNull RelativeMapPath o)
compareTo
in interface java.lang.Comparable<RelativeMapPath>
public boolean equals(@Nullable @Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object