Package net.sf.gridarta.model.mapmodel
Class AbsoluteMapPath
- java.lang.Object
-
- net.sf.gridarta.model.mapmodel.AbsoluteMapPath
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AbsoluteMapPath>,MapPath
public class AbsoluteMapPath extends java.lang.Object implements java.lang.Comparable<AbsoluteMapPath>, MapPath
AMapPaththat is absolute, that is, it starts with a "/".- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbsoluteMapPath()Creates a new instance.AbsoluteMapPath(@NotNull AbsoluteMapPath parent, @NotNull java.lang.String name)Creates a new map path based on a parent map path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull AbsoluteMapPath o)booleanequals(@Nullable java.lang.Object obj)@Nullable java.lang.StringgetMapComponent()Returns the initial path component of a map path.@NotNull java.lang.StringgetPath()Returns the map path information.@NotNull RelativeMapPathgetRelativeMapPathFrom(@NotNull AbsoluteMapPath mapPath)Returns this map path relative to another map path.inthashCode()java.lang.StringtoString()
-
-
-
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 pathname- the name of the child; "." or ".." are allowed
-
-
Method Detail
-
getPath
@NotNull public @NotNull java.lang.String getPath()
Description copied from interface:MapPathReturns the map path information.
-
getMapComponent
@Nullable public @Nullable java.lang.String getMapComponent()
Description copied from interface:MapPathReturns the initial path component of a map path. "/path/to/map" returns "path", "/map" returnsnull. Relative map paths always returnnull.- Specified by:
getMapComponentin interfaceMapPath- Returns:
- the initial path component
-
getRelativeMapPathFrom
@NotNull public @NotNull RelativeMapPath getRelativeMapPathFrom(@NotNull @NotNull AbsoluteMapPath mapPath)
Description copied from interface:MapPathReturns this map path relative to another map path.- Specified by:
getRelativeMapPathFromin interfaceMapPath- 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:
compareToin interfacejava.lang.Comparable<AbsoluteMapPath>
-
equals
public boolean equals(@Nullable @Nullable java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-