20 package net.sf.gridarta.model.exitconnector;
22 import java.awt.Point;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
64 public ExitLocation(@NotNull
final MapFile mapFile, @NotNull
final Point point, @NotNull
final String mapName) {
77 return new Point(x, y);
90 if (sourceMapFile == null) {
92 mapPath = targetMapPath;
97 if (sourceMapComponent == null ? targetMapComponent == null : sourceMapComponent.equals(targetMapComponent)) {
102 mapPath = targetMapPath;
123 public boolean equals(@Nullable
final Object obj) {
127 if (obj == null || obj.getClass() != getClass()) {
131 return x == exitLocation.
x && y == exitLocation.
y && mapFile.
equals(exitLocation.
mapFile) && mapName.equals(exitLocation.
mapName);
136 return x ^ (y << 16) ^ (y >> 16) ^ mapFile.
hashCode() ^ mapName.hashCode();
141 return mapFile +
" " + x +
"/" + y +
" " +
mapName;
ExitLocation(@NotNull final MapFile mapFile, @NotNull final Point point, @NotNull final String mapName)
Creates a new instance.
A MapPath that is absolute, that is, it starts with a "/".
final int x
The x-coordinate of the remembered exit.
AbsoluteMapPath getMapPath()
Returns the map path within getMapsDir().
Represents a maps directory local map path.
String getMapComponent()
Returns the initial path component of a map path.
RelativeMapPath getRelativeMapPathTo(@NotNull final MapPath mapPath)
Returns a map path of an another map path relative to this map path.
String SLAYING
The name of the "slaying" attribute.
Base package of all Gridarta classes.
final int y
The y-coordinate of the remembered exit.
boolean equals(@Nullable final Object obj)
String getMapComponent()
Returns the initial path component of a map path.
boolean equals(@Nullable final Object obj)
String HP
The attribute name of the "hp" attribute.
final String mapName
The map name of the remembered exit.
final MapFile mapFile
The file of the map that contains the remembered exit.
Point getMapCoordinate()
Returns the coordinate of the remembered exit.
Stores information about a remembered exit location.
String SP
The attribute name of the "sp" attribute.
String NAME
The attribute name of the object's name.
void updateExitObject(@NotNull final BaseObject<?, ?, ?, ?> gameObject, final boolean updateName, @Nullable final MapFile sourceMapFile)
Updates exit information.
MapFile getMapFile()
Returns the file of the map that contains the remembered exit.
The location of a map file with a map directory.