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

Utility class for MapPath related functions. More...

+ Collaboration diagram for net.sf.gridarta.model.mapmodel.MapPathUtils:

Static Public Member Functions

static AbsoluteMapPath append (@NotNull final AbsoluteMapPath baseMapPath, @NotNull final MapPath mapPath)
 Appends a map path to another map path. More...
 
static RelativeMapPath append (@NotNull final RelativeMapPath baseMapPath, @NotNull final RelativeMapPath mapPath)
 Appends a map path to another map path. More...
 
static AbsoluteMapPath newAbsoluteMapPath (@NotNull final String string)
 Creates an AbsoluteMapPath instance from string representation. More...
 
static MapPath newMapPath (@NotNull final String string)
 Creates a MapPath instance from string representation. More...
 
static RelativeMapPath newRelativeMapPath (@NotNull final String string)
 Creates a RelativeMapPath instance from string representation. More...
 

Private Member Functions

 MapPathUtils ()
 Private constructor to prevent instantiation. More...
 

Static Private Member Functions

static AbsoluteMapPath append (@NotNull final AbsoluteMapPath mapPath, @NotNull final CharSequence string)
 Appends a relative path to a MapPath. More...
 
static RelativeMapPath append (@NotNull final RelativeMapPath mapPath, @NotNull final CharSequence string)
 Appends a relative path to a MapPath. More...
 

Detailed Description

Utility class for MapPath related functions.

Author
Andreas Kirschbaum

Definition at line 28 of file MapPathUtils.java.

Constructor & Destructor Documentation

◆ MapPathUtils()

net.sf.gridarta.model.mapmodel.MapPathUtils.MapPathUtils ( )
private

Private constructor to prevent instantiation.

Definition at line 33 of file MapPathUtils.java.

Member Function Documentation

◆ append() [1/4]

static AbsoluteMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.append ( @NotNull final AbsoluteMapPath  baseMapPath,
@NotNull final MapPath  mapPath 
)
static

◆ append() [2/4]

static RelativeMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.append ( @NotNull final RelativeMapPath  baseMapPath,
@NotNull final RelativeMapPath  mapPath 
)
static

Appends a map path to another map path.

Parameters
baseMapPaththe base map path to append to
mapPaththe map path to append
Returns
the combined path TypeMayBeWeakened

Definition at line 98 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.MapPathUtils.append().

+ Here is the call graph for this function:

◆ append() [3/4]

static AbsoluteMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.append ( @NotNull final AbsoluteMapPath  mapPath,
@NotNull final CharSequence  string 
)
staticprivate

Appends a relative path to a MapPath.

Parameters
mapPaththe map path to append to
stringthe relative path to append
Returns
the combined path

Definition at line 109 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.AbsoluteMapPath.getPath(), and net.sf.gridarta.model.mapmodel.MapPath.SEPARATOR.

+ Here is the call graph for this function:

◆ append() [4/4]

static RelativeMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.append ( @NotNull final RelativeMapPath  mapPath,
@NotNull final CharSequence  string 
)
staticprivate

Appends a relative path to a MapPath.

Parameters
mapPaththe map path to append to
stringthe relative path to append
Returns
the combined path

Definition at line 130 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.RelativeMapPath.getPath(), and net.sf.gridarta.model.mapmodel.MapPath.SEPARATOR.

+ Here is the call graph for this function:

◆ newAbsoluteMapPath()

static AbsoluteMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.newAbsoluteMapPath ( @NotNull final String  string)
static

Creates an AbsoluteMapPath instance from string representation.

Ignores excess "/" characters.

Parameters
stringthe string representation
Returns
the map path instance

Definition at line 58 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.MapPathUtils.append().

Referenced by net.sf.gridarta.gui.dialog.plugin.parameter.MapPathParameterView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapPathParameterView(), net.sf.gridarta.model.mapmodel.MapPathUtilsTest.testAppendAbsolute1(), and net.sf.gridarta.model.mapmodel.MapPathTest.testGetRelativeMapPathTo1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newMapPath()

static MapPath net.sf.gridarta.model.mapmodel.MapPathUtils.newMapPath ( @NotNull final String  string)
static

Creates a MapPath instance from string representation.

Ignores excess "/" characters.

Parameters
stringthe string representation
Returns
the map path instance

Definition at line 43 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.MapPathUtils.append().

Referenced by net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doCreateTile(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doEnterMap(), net.sf.gridarta.model.io.PathManager.getMapFile(), net.sf.gridarta.model.maplocation.MapLocation.getMapPath(), net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.loadMapControl(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap(), net.sf.gridarta.model.mapmodel.MapPathUtilsTest.testAppendAbsolute1(), net.sf.gridarta.model.mapmodel.MapFileTest.testGetFile1(), net.sf.gridarta.model.mapmodel.MapPathTest.testGetMapComponent1(), net.sf.gridarta.model.mapmodel.MapFileTest.testGetRelativeMapFile1(), net.sf.gridarta.model.mapmodel.MapFileTest.testGetRelativeMapFile2(), net.sf.gridarta.model.mapmodel.MapPathTest.testGetRelativeMapPathTo1(), net.sf.gridarta.model.mapmodel.MapFileTest.testNew3(), net.sf.gridarta.model.mapmodel.MapPathUtilsTest.testNewMapPath1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testPath(), net.sf.gridarta.model.validation.checks.ExitChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject(), and net.sf.gridarta.model.validation.checks.TilePathsChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newRelativeMapPath()

static RelativeMapPath net.sf.gridarta.model.mapmodel.MapPathUtils.newRelativeMapPath ( @NotNull final String  string)
static

Creates a RelativeMapPath instance from string representation.

Ignores excess "/" characters.

Parameters
stringthe string representation
Returns
the map path instance

Definition at line 72 of file MapPathUtils.java.

References net.sf.gridarta.model.mapmodel.MapPathUtils.append().

Referenced by net.sf.gridarta.model.mapmodel.MapPathUtilsTest.testAppendRelative1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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