|
Gridarta Editor
|
Represents a location on a map consisting of a map path and a map coordinate. More...
Inheritance diagram for net.sf.gridarta.model.maplocation.MapLocation:
Collaboration diagram for net.sf.gridarta.model.maplocation.MapLocation:Public Member Functions | |
| int | compareTo (@NotNull final MapLocation o) |
| boolean | equals (@Nullable final Object obj) |
| Point | getMapCoordinate () |
| Returns the map coordinate. More... | |
| MapPath | getMapPath () |
| Returns the map path. More... | |
| int | hashCode () |
| MapLocation (@NotNull final BaseObject<?, ?, ?, ?> gameObject, final boolean allowRandomMapParameters) throws NoExitPathException | |
| Creates a new instance from a BaseObject instance. More... | |
| String | toString () |
Static Public Member Functions | |
| static MapPath | getMapPath (@NotNull final BaseObject<?, ?, ?, ?> gameObject, final boolean allowRandomMapParameters) throws NoExitPathException |
| Returns the exit map path of a BaseObject. More... | |
| static MapLocation | newAbsoluteMapLocation (@NotNull final GameObject<?, ?, ?> gameObject, final boolean allowRandomMapParameters) throws NoExitPathException |
| Creates a new instance from a BaseObject instance. More... | |
Private Member Functions | |
| MapLocation (@NotNull final MapPath mapPath, final int mapXCoordinate, final int mapYCoordinate) | |
| Creates a new instance. More... | |
Static Private Member Functions | |
| static int | getMapX (@NotNull final Attributes gameObject) |
| Returns the exit y coordinate of a BaseObject. More... | |
| static int | getMapY (@NotNull final Attributes gameObject) |
| Returns the exit x coordinate of a BaseObject. More... | |
| static String | getRandomMapParameter (@NotNull final BaseObject<?, ?, ?, ?> gameObject, @NotNull final String parameterName) |
| Extracts a parameter value for an exit to a random map. More... | |
Private Attributes | |
| final Point | mapCoordinate |
| The map coordinate. More... | |
| final MapPath | mapPath |
| The map path. More... | |
Static Private Attributes | |
| static final Pattern | PATTERN_END_OF_LINE = Pattern.compile("[\r\n]+") |
| The Pattern that matches end of lines in random map parameters. More... | |
Represents a location on a map consisting of a map path and a map coordinate.
Definition at line 42 of file MapLocation.java.
|
private |
Creates a new instance.
| mapPath | the map path |
| mapXCoordinate | the map x-coordinate |
| mapYCoordinate | the map y-coordinate |
Definition at line 68 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.mapPath.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.equals(), and net.sf.gridarta.model.maplocation.MapLocation.newAbsoluteMapLocation().
Here is the caller graph for this function:| net.sf.gridarta.model.maplocation.MapLocation.MapLocation | ( | @NotNull final BaseObject<?, ?, ?, ?> | gameObject, |
| final boolean | allowRandomMapParameters | ||
| ) | throws NoExitPathException |
Creates a new instance from a BaseObject instance.
| gameObject | the game object |
| allowRandomMapParameters | whether random map parameters should be considered |
| NoExitPathException | if the game object is not a valid exit |
Definition at line 80 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.getMapPath(), net.sf.gridarta.model.maplocation.MapLocation.getMapX(), and net.sf.gridarta.model.maplocation.MapLocation.getMapY().
Here is the call graph for this function:| int net.sf.gridarta.model.maplocation.MapLocation.compareTo | ( | @NotNull final MapLocation | o | ) |
Definition at line 226 of file MapLocation.java.
Referenced by net.sf.gridarta.gui.dialog.goexit.MapListCellRenderer.compare().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.maplocation.MapLocation.equals | ( | @Nullable final Object | obj | ) |
Definition at line 134 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.mapCoordinate, net.sf.gridarta.model.maplocation.MapLocation.MapLocation(), and net.sf.gridarta.model.maplocation.MapLocation.mapPath.
Here is the call graph for this function:| Point net.sf.gridarta.model.maplocation.MapLocation.getMapCoordinate | ( | ) |
Returns the map coordinate.
Definition at line 129 of file MapLocation.java.
Referenced by net.sf.gridarta.gui.map.mapactions.EnterMap< G, A, R >.enterExit(), and net.sf.gridarta.gui.dialog.goexit.MapListCellRenderer.getListCellRendererComponent().
Here is the caller graph for this function:| MapPath net.sf.gridarta.model.maplocation.MapLocation.getMapPath | ( | ) |
Returns the map path.
Definition at line 120 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.mapPath.
Referenced by net.sf.gridarta.gui.map.mapactions.EnterMap< G, A, R >.enterExit(), net.sf.gridarta.gui.dialog.goexit.MapListCellRenderer.getListCellRendererComponent(), net.sf.gridarta.model.maplocation.MapLocation.MapLocation(), net.sf.gridarta.model.maplocation.MapLocation.newAbsoluteMapLocation(), and net.sf.gridarta.var.crossfire.model.validation.checks.NonAbsoluteExitPathChecker.validateGameObject().
Here is the caller graph for this function:
|
static |
Returns the exit map path of a BaseObject.
| gameObject | the game object |
| allowRandomMapParameters | whether random maps should be considered |
| NoExitPathException | if the game object is not a valid exit |
Definition at line 176 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.getRandomMapParameter(), net.sf.gridarta.model.mapmodel.MapPathUtils.newMapPath(), and net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.SLAYING.
Here is the call graph for this function:
|
staticprivate |
Returns the exit y coordinate of a BaseObject.
| gameObject | the game object |
Definition at line 164 of file MapLocation.java.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.MapLocation(), and net.sf.gridarta.model.maplocation.MapLocation.newAbsoluteMapLocation().
Here is the caller graph for this function:
|
staticprivate |
Returns the exit x coordinate of a BaseObject.
| gameObject | the game object |
Definition at line 155 of file MapLocation.java.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.MapLocation(), and net.sf.gridarta.model.maplocation.MapLocation.newAbsoluteMapLocation().
Here is the caller graph for this function:
|
staticprivate |
Extracts a parameter value for an exit to a random map.
| gameObject | the exit object containing the parameters |
| parameterName | the parameter name to use |
Definition at line 201 of file MapLocation.java.
References net.sf.gridarta.utils.StringUtils.PATTERN_SPACES.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.getMapPath().
Here is the caller graph for this function:| int net.sf.gridarta.model.maplocation.MapLocation.hashCode | ( | ) |
Definition at line 146 of file MapLocation.java.
|
static |
Creates a new instance from a BaseObject instance.
The new
instance includes an absolute map path.
| gameObject | the game object |
| allowRandomMapParameters | whether random map parameters should be considered |
| NoExitPathException | if the game object is not a valid exit |
Definition at line 94 of file MapLocation.java.
References net.sf.gridarta.model.mapmodel.MapPathUtils.append(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile(), net.sf.gridarta.model.mapmodel.MapSquare< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapmodel.MapFile.getMapPath(), net.sf.gridarta.model.maplocation.MapLocation.getMapPath(), net.sf.gridarta.model.mapmodel.MapSquare< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapSquare(), net.sf.gridarta.model.maplocation.MapLocation.getMapX(), net.sf.gridarta.model.maplocation.MapLocation.getMapY(), and net.sf.gridarta.model.maplocation.MapLocation.MapLocation().
Referenced by net.sf.gridarta.gui.dialog.goexit.MapListCellRenderer.getMapLocation(), and net.sf.gridarta.gui.dialog.goexit.GoExitDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.showDialog().
Here is the call graph for this function:
Here is the caller graph for this function:| String net.sf.gridarta.model.maplocation.MapLocation.toString | ( | ) |
Definition at line 220 of file MapLocation.java.
References net.sf.gridarta.model.maplocation.MapLocation.mapPath.
|
private |
The map coordinate.
Definition at line 60 of file MapLocation.java.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.equals().
|
private |
The map path.
Definition at line 54 of file MapLocation.java.
Referenced by net.sf.gridarta.model.maplocation.MapLocation.equals(), net.sf.gridarta.model.maplocation.MapLocation.getMapPath(), net.sf.gridarta.model.maplocation.MapLocation.MapLocation(), and net.sf.gridarta.model.maplocation.MapLocation.toString().
|
staticprivate |
The Pattern that matches end of lines in random map parameters.
Definition at line 48 of file MapLocation.java.