Gridarta Editor
net.sf.gridarta.model.mapmodel.AbsoluteMapPath Class Reference

A MapPath that is absolute, that is, it starts with a "/". More...

+ Inheritance diagram for net.sf.gridarta.model.mapmodel.AbsoluteMapPath:
+ Collaboration diagram for net.sf.gridarta.model.mapmodel.AbsoluteMapPath:

Public Member Functions

 AbsoluteMapPath ()
 Creates a new instance. More...
 
 AbsoluteMapPath (@NotNull final AbsoluteMapPath parent, @NotNull final String name)
 Creates a new map path based on a parent map path. More...
 
int compareTo (@NotNull final AbsoluteMapPath o)
 
boolean equals (@Nullable final Object obj)
 
String getMapComponent ()
 Returns the initial path component of a map path. More...
 
String getPath ()
 Returns the map path information. More...
 
RelativeMapPath getRelativeMapPathTo (@NotNull final MapPath mapPath)
 Returns a map path of an another map path relative to this map path. More...
 
int hashCode ()
 
String toString ()
 

Private Attributes

final String path
 The map path information. More...
 

Static Private Attributes

static final long serialVersionUID = 1L
 The serial versionUID,. More...
 

Additional Inherited Members

- Public Attributes inherited from net.sf.gridarta.model.mapmodel.MapPath
Pattern SEPARATOR = Pattern.compile("/")
 A Pattern to split a map path's string representation into components. More...
 

Detailed Description

A MapPath that is absolute, that is, it starts with a "/".

Author
Andreas Kirschbaum

Definition at line 29 of file AbsoluteMapPath.java.

Constructor & Destructor Documentation

◆ AbsoluteMapPath() [1/2]

net.sf.gridarta.model.mapmodel.AbsoluteMapPath.AbsoluteMapPath ( )

Creates a new instance.

Definition at line 46 of file AbsoluteMapPath.java.

Referenced by net.sf.gridarta.model.mapmodel.AbsoluteMapPath.equals().

+ Here is the caller graph for this function:

◆ AbsoluteMapPath() [2/2]

net.sf.gridarta.model.mapmodel.AbsoluteMapPath.AbsoluteMapPath ( @NotNull final AbsoluteMapPath  parent,
@NotNull final String  name 
)

Creates a new map path based on a parent map path.

Parameters
parentthe parent map path
namethe name of the child; "." or ".." are allowed

Definition at line 55 of file AbsoluteMapPath.java.

Member Function Documentation

◆ compareTo()

int net.sf.gridarta.model.mapmodel.AbsoluteMapPath.compareTo ( @NotNull final AbsoluteMapPath  o)

Definition at line 120 of file AbsoluteMapPath.java.

◆ equals()

boolean net.sf.gridarta.model.mapmodel.AbsoluteMapPath.equals ( @Nullable final Object  obj)

◆ getMapComponent()

String net.sf.gridarta.model.mapmodel.AbsoluteMapPath.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

Implements net.sf.gridarta.model.mapmodel.MapPath.

Definition at line 110 of file AbsoluteMapPath.java.

Referenced by net.sf.gridarta.model.exitconnector.ExitLocation.updateExitObject().

+ Here is the caller graph for this function:

◆ getPath()

◆ getRelativeMapPathTo()

RelativeMapPath net.sf.gridarta.model.mapmodel.AbsoluteMapPath.getRelativeMapPathTo ( @NotNull final MapPath  mapPath)

Returns a map path of an another map path relative to this map path.

Parameters
mapPaththe other map path
Returns
the relative map path from this map path to the other map path

Definition at line 98 of file AbsoluteMapPath.java.

Referenced by net.sf.gridarta.model.mapmodel.MapFile.getRelativeMapFileTo(), net.sf.gridarta.model.mapmodel.MapPathTest.testGetRelativeMapPathTo1(), and net.sf.gridarta.model.exitconnector.ExitLocation.updateExitObject().

+ Here is the caller graph for this function:

◆ hashCode()

int net.sf.gridarta.model.mapmodel.AbsoluteMapPath.hashCode ( )

Definition at line 134 of file AbsoluteMapPath.java.

Referenced by net.sf.gridarta.model.mapmodel.MapFile.hashCode().

+ Here is the caller graph for this function:

◆ toString()

Member Data Documentation

◆ path

final String net.sf.gridarta.model.mapmodel.AbsoluteMapPath.path
private

The map path information.

It does not include a leading "/" for absolute paths.

Definition at line 41 of file AbsoluteMapPath.java.

Referenced by net.sf.gridarta.model.mapmodel.AbsoluteMapPath.equals(), net.sf.gridarta.model.mapmodel.AbsoluteMapPath.getPath(), and net.sf.gridarta.model.mapmodel.AbsoluteMapPath.toString().

◆ serialVersionUID

final long net.sf.gridarta.model.mapmodel.AbsoluteMapPath.serialVersionUID = 1L
staticprivate

The serial versionUID,.

Definition at line 34 of file AbsoluteMapPath.java.


The documentation for this class was generated from the following file: