org.flexgen.map
Class MapTileLocation

java.lang.Object
  extended by org.flexgen.map.MapTileLocation

public class MapTileLocation
extends java.lang.Object

Class representing the location of a map tile in a map.


Constructor Summary
MapTileLocation(int x, int y)
          Construct a map tile location.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines whether or not this map tile location is equal to another map tile location.
 MapTileLocation[] getNeighborLocations()
          Get an array of map tile locations that are neighbors of this map tile location.
 int getX()
          Get the X coordinate of the map tile location.
 int getY()
          Get the Y coordinate of the map tile location.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Get the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapTileLocation

public MapTileLocation(int x,
                       int y)
Construct a map tile location.

Parameters:
x - X coordinate of the map tile location.
y - Y coordinate of the map tile location.
Method Detail

getX

public int getX()
Get the X coordinate of the map tile location.

Returns:
The X coordinate of the map tile location.

getY

public int getY()
Get the Y coordinate of the map tile location.

Returns:
The Y coordinate of the map tile location.

getNeighborLocations

public MapTileLocation[] getNeighborLocations()
Get an array of map tile locations that are neighbors of this map tile location.

Returns:
Array of map tile locations that are neighbors of this map tile location.

toString

public java.lang.String toString()
Get the string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this object.

equals

public boolean equals(java.lang.Object obj)
Determines whether or not this map tile location is equal to another map tile location.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The map tile location against which to compare this map tile location.
Returns:
True if the two map tile locations are equal, false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.


FlexGen Home

Get FlexGen at SourceForge.net. Fast, secure and Free Open Source software downloads

Copyright © 2009 - Jeffrey J. Weston <jjweston@gmail.com>

All rights reserved. Use is subject to license terms.