megamek.common
Class UnitLocation

java.lang.Object
  extended by megamek.common.UnitLocation
All Implemented Interfaces:
java.io.Serializable

public class UnitLocation
extends java.lang.Object
implements java.io.Serializable

A simple class to specify a location and facing for a unit.

See Also:
Serialized Form

Constructor Summary
UnitLocation(int id, Coords coords, int facing, int elevation)
          Create a new location object.
 
Method Summary
 Coords getCoords()
          Get the coordinates of this location.
 int getElevation()
          Get the elevation of the entity at this location.
 int getFacing()
          Get the facing of the entity at this location.
 int getId()
          Get the ID number of the entity at this location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitLocation

public UnitLocation(int id,
                    Coords coords,
                    int facing,
                    int elevation)
Create a new location object.

Parameters:
id - the unit's int ID number.
coords - the Coords of this location.
facing - the unit's int facing at this location.
elevation - the unit's int elevation at this location.
Method Detail

getId

public int getId()
Get the ID number of the entity at this location.

Returns:
the int ID of the entity.

getCoords

public Coords getCoords()
Get the coordinates of this location.

Returns:
the Coords coordinates of the location.

getFacing

public int getFacing()
Get the facing of the entity at this location.

Returns:
the int facing of the entity.

getElevation

public int getElevation()
Get the elevation of the entity at this location.

Returns:
the int elevation of the entity.