public class MapFile
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MapFile(java.io.File mapsDir)
Creates a new instance for the maps directory.
|
MapFile(MapFile parent,
MapPath mapPath)
Creates a new instance.
|
MapFile(MapFile parent,
java.lang.String name)
Creates a new instance for a child of a parent map file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.io.File |
getFile()
Returns a
File for this map file. |
AbsoluteMapPath |
getMapPath()
Returns the map path within
getMapsDir() . |
java.io.File |
getMapsDir()
Returns the base directory this map file is part of.
|
MapPath |
getRelativeMapFileTo(MapFile mapFile)
Returns a map path of an another map file relative to this map file.
|
int |
hashCode() |
java.lang.String |
toString() |
public MapFile(@NotNull java.io.File mapsDir)
mapsDir
- the maps directorypublic MapFile(@NotNull MapFile parent, @NotNull java.lang.String name)
parent
- the parent map filename
- the name of the child@NotNull public java.io.File getMapsDir()
@NotNull public AbsoluteMapPath getMapPath()
getMapsDir()
.@NotNull public java.io.File getFile()
File
for this map file.@NotNull public MapPath getRelativeMapFileTo(@NotNull MapFile mapFile) throws DifferentMapBaseException
mapFile
- the other map fileDifferentMapBaseException
- if the two map files do not have the
same maps directorypublic boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object