Package com.massifmaps.core
Class MapTile
java.lang.Object
com.massifmaps.core.MapTile
An immutable map tile, used by tile layers for representing small pieces of map at different zoom levels and coordinates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.intReturns the time of this map tile.longReturns the internal tile id of this map tile.intgetX()Returns the x coordinate of this map tile.intgetY()Returns the y coordinate of this map tile.intgetZoom()Returns the zoom level of this map tile.inthashCode()Returns the hash value of this object.toString()Creates a string representation of this map tile, useful for logging.
-
Constructor Details
-
MapTile
public MapTile()Constructs an empty MapTile object. -
MapTile
public MapTile(int x, int y, int zoom, int frameNr) Constructs a MapTile object based on coordinates, zoom level and frame number.- Parameters:
x- The x coordinate of the tile.y- The y coordinate of the tile.zoom- The zoom level of the tile.frameNr- The frame number of the tile.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getX
public int getX()Returns the x coordinate of this map tile.- Returns:
- The x coordinate of this map tile.
-
getY
public int getY()Returns the y coordinate of this map tile.- Returns:
- The y coordinate of this map tile.
-
getZoom
public int getZoom()Returns the zoom level of this map tile.- Returns:
- The zoom level of this map tile.
-
getFrameNr
public int getFrameNr()Returns the time of this map tile.- Returns:
- The time of this map tile.
-
getTileId
public long getTileId()Returns the internal tile id of this map tile.- Returns:
- The internal tile id of this map tile.
-
toString
Creates a string representation of this map tile, useful for logging.
-