com.pegacat.vcf.data
Class VoyagerObject

java.lang.Object
  |
  +--com.pegacat.vcf.data.VoyagerObject
Direct Known Subclasses:
Body, Star, Unit

public class VoyagerObject
extends java.lang.Object

Represents a game object or location of some sort - e.g. a ship, an reu, a star. This is intended to be a base class.


Field Summary
protected  VoyagerLocation location
          the location of the object (e.g.
protected  java.lang.String name
          the name of the object, usually a numeric string such as '833'
protected  java.lang.String text
          general associated text, if any
 
Constructor Summary
VoyagerObject(java.lang.String name, VoyagerLocation location)
          Creates an object with a name and location.
VoyagerObject(java.lang.String name, VoyagerLocation location, java.lang.String description)
          Creates an object with a name, location, and description.
 
Method Summary
 VoyagerLocation getLocation()
          returns the full location associated with this object
 java.lang.String getName()
          Returns the name of the object, as a String.
 java.lang.String getNamedPosition()
          convenience link to the corresponding VoyagerLocation method
 java.lang.String getText()
          returns the associated text description of the object (if any).
 int getX()
          convenience link to the corresponding VoyagerLocation method
 int getY()
          convenience link to the corresponding VoyagerLocation method
 int getZ()
          convenience link to the corresponding VoyagerLocation method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
the name of the object, usually a numeric string such as '833'

text

protected java.lang.String text
general associated text, if any

location

protected VoyagerLocation location
the location of the object (e.g. 'w123a7')
Constructor Detail

VoyagerObject

public VoyagerObject(java.lang.String name,
                     VoyagerLocation location)
Creates an object with a name and location.

VoyagerObject

public VoyagerObject(java.lang.String name,
                     VoyagerLocation location,
                     java.lang.String description)
Creates an object with a name, location, and description.
Method Detail

getName

public java.lang.String getName()
Returns the name of the object, as a String. (Often this is a numeric string, e.g. ship '334').

getLocation

public VoyagerLocation getLocation()
returns the full location associated with this object

getX

public int getX()
convenience link to the corresponding VoyagerLocation method

getY

public int getY()
convenience link to the corresponding VoyagerLocation method

getZ

public int getZ()
convenience link to the corresponding VoyagerLocation method

getNamedPosition

public java.lang.String getNamedPosition()
convenience link to the corresponding VoyagerLocation method

getText

public java.lang.String getText()
returns the associated text description of the object (if any).