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

Represents a maps directory local map path. More...

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

Public Member Functions

int compareTo (@NotNull final RelativeMapPath 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...
 
int hashCode ()
 
 RelativeMapPath ()
 Creates a new instance. More...
 
 RelativeMapPath (@NotNull final RelativeMapPath parent, @NotNull final String name)
 Creates a new map path based on a parent map path. More...
 
 RelativeMapPath (@NotNull final AbsoluteMapPath sourceMapPath, @NotNull final AbsoluteMapPath destinationMapPath)
 Creates a new instance as the difference between two absolute map paths. More...
 
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

Represents a maps directory local map path.

Author
Andreas Kirschbaum

Definition at line 29 of file RelativeMapPath.java.

Constructor & Destructor Documentation

◆ RelativeMapPath() [1/3]

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

Creates a new instance.

Definition at line 46 of file RelativeMapPath.java.

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

+ Here is the caller graph for this function:

◆ RelativeMapPath() [2/3]

net.sf.gridarta.model.mapmodel.RelativeMapPath.RelativeMapPath ( @NotNull final RelativeMapPath  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 RelativeMapPath.java.

◆ RelativeMapPath() [3/3]

net.sf.gridarta.model.mapmodel.RelativeMapPath.RelativeMapPath ( @NotNull final AbsoluteMapPath  sourceMapPath,
@NotNull final AbsoluteMapPath  destinationMapPath 
)

Creates a new instance as the difference between two absolute map paths.

Parameters
sourceMapPaththe source map path to start from
destinationMapPaththe destination map path to point to TypeMayBeWeakened

Definition at line 92 of file RelativeMapPath.java.

References net.sf.gridarta.model.mapmodel.MapPath.SEPARATOR.

Member Function Documentation

◆ compareTo()

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

Definition at line 129 of file RelativeMapPath.java.

◆ equals()

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

◆ getMapComponent()

String net.sf.gridarta.model.mapmodel.RelativeMapPath.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 124 of file RelativeMapPath.java.

◆ getPath()

String net.sf.gridarta.model.mapmodel.RelativeMapPath.getPath ( )

Returns the map path information.

Returns
the map path information; it does not include a leading "/" for absolute paths

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

Definition at line 118 of file RelativeMapPath.java.

References net.sf.gridarta.model.mapmodel.RelativeMapPath.path.

Referenced by net.sf.gridarta.model.mapmodel.MapPathUtils.append().

+ Here is the caller graph for this function:

◆ hashCode()

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

Definition at line 143 of file RelativeMapPath.java.

◆ toString()

String net.sf.gridarta.model.mapmodel.RelativeMapPath.toString ( )

Member Data Documentation

◆ path

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

The map path information.

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

Definition at line 41 of file RelativeMapPath.java.

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

◆ serialVersionUID

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

The serial versionUID,.

Definition at line 34 of file RelativeMapPath.java.


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