|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.Location
The Location class represents a "location" in the universe. For example, this location might be a coordinate in space or orbiting a planet or docked at a space station. The class LocationType is an enumrated type for this class.
LocationType
,
Serialized FormField Summary | |
(package private) Coord |
coord
|
(package private) GalaxyID |
galaxyid
|
(package private) PlanetID |
planetid
|
(package private) StationID |
stationid
|
(package private) SystemID |
systemid
|
(package private) LocationType |
type
|
Constructor Summary | |
Location()
Default constructor - sets an undefined location object. |
|
Location(Coord in_coord)
Constructor that takes a Coord object. |
|
Location(GalaxyID in_galaxy,
Coord in_coord)
Constructor that takes a Coord object. |
|
Location(Location loc)
|
|
Location(PlanetID PID)
Constructor that takes a PlanetID object representing orbiting the planet. |
|
Location(PlanetID PID,
boolean surface)
Constructor that takes a PlanetID object and a boolean representing if the location is in orbit or on the surface. |
|
Location(StationID BID)
Constructor that takes a StationID object. |
|
Location(SystemID SID)
Constructor that takes a SystemID object. |
Method Summary | |
java.lang.Object |
clone()
|
float |
distance(Location target)
|
boolean |
equals(java.lang.Object ob)
|
Index |
getContext()
|
Coord |
getCoords()
|
GalaxyID |
getGalaxy()
|
PlanetID |
getPlanet()
|
StationID |
getStation()
|
SystemID |
getSystem()
|
LocationType |
getType()
|
void |
setCoords(Coord in_coord)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
LocationType type
Coord coord
GalaxyID galaxyid
SystemID systemid
PlanetID planetid
StationID stationid
Constructor Detail |
public Location(Location loc)
public Location()
public Location(Coord in_coord)
public Location(GalaxyID in_galaxy, Coord in_coord)
public Location(PlanetID PID)
public Location(PlanetID PID, boolean surface)
public Location(SystemID SID)
public Location(StationID BID)
Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public LocationType getType()
public PlanetID getPlanet()
public SystemID getSystem()
public GalaxyID getGalaxy()
public StationID getStation()
public Index getContext()
public Coord getCoords()
public void setCoords(Coord in_coord)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
public float distance(Location target)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |