org.gjt.universe
Class GalaxyType

java.lang.Object
  |
  +--org.gjt.universe.KeyedItem
        |
        +--org.gjt.universe.GalaxyType
All Implemented Interfaces:
java.io.Serializable

public class GalaxyType
extends KeyedItem
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static GalaxyType ELLIPTICAL
           
static java.lang.String ELLIPTICAL_KEY
           
static GalaxyType GLIESE
           
static java.lang.String GLIESE_KEY
           
static GalaxyType GLOBULAR
           
static java.lang.String GLOBULAR_KEY
           
private  boolean isRandom
           
static GalaxyType SPIRAL
           
static java.lang.String SPIRAL_KEY
           
static GalaxyType STD
           
static java.lang.String STD_KEY
           
static GalaxyType[] UNIQUE_TYPES
           
static GalaxyType[] USUAL_RANDOM_TYPES
           
 
Fields inherited from class org.gjt.universe.KeyedItem
 
Constructor Summary
private GalaxyType(java.lang.String aKey)
          This constructor is declared private as instances will be created solely via the public class variable initialization above.
 
Method Summary
static GalaxyType FindByKey(java.lang.String aKey)
          This class method returns the GalaxyType which is stored under the given key, or null if no such object exists.
 boolean isRandom()
          This method returns true if the receiving instance represents a galaxy type whose contents are determined entirely randomly.
 void performLocalization()
          This method overrides that of our abstract base class to set the description and back story of the receiving GalaxyType object.
 
Methods inherited from class org.gjt.universe.KeyedItem
FindByDescriptionAndSpace, FindByKeyAndSpace, getBackStory, getDescription, getKey, hashCode, setBackStory, setDescription, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STD_KEY

public static java.lang.String STD_KEY

GLOBULAR_KEY

public static java.lang.String GLOBULAR_KEY

SPIRAL_KEY

public static java.lang.String SPIRAL_KEY

ELLIPTICAL_KEY

public static java.lang.String ELLIPTICAL_KEY

GLIESE_KEY

public static java.lang.String GLIESE_KEY

STD

public static GalaxyType STD

GLOBULAR

public static GalaxyType GLOBULAR

SPIRAL

public static GalaxyType SPIRAL

ELLIPTICAL

public static GalaxyType ELLIPTICAL

GLIESE

public static GalaxyType GLIESE

USUAL_RANDOM_TYPES

public static GalaxyType[] USUAL_RANDOM_TYPES

UNIQUE_TYPES

public static GalaxyType[] UNIQUE_TYPES

isRandom

private boolean isRandom
Constructor Detail

GalaxyType

private GalaxyType(java.lang.String aKey)
This constructor is declared private as instances will be created solely via the public class variable initialization above.

Parameters:
aKey - The key which uniquely identifies the instance.
Method Detail

FindByKey

public static GalaxyType FindByKey(java.lang.String aKey)
This class method returns the GalaxyType which is stored under the given key, or null if no such object exists.

Parameters:
aKey - The key uniquely identifying the desired galaxy type

isRandom

public boolean isRandom()
This method returns true if the receiving instance represents a galaxy type whose contents are determined entirely randomly. Galaxy types with a fixed set of star systems would have the value false. This method is typically used when including multiple galaxy types in the same game. Non-random galaxy types will only be included in the game once, while random galaxy types may be repeated as often as desired, since each one will be unique.


performLocalization

public void performLocalization()
This method overrides that of our abstract base class to set the description and back story of the receiving GalaxyType object. This method will be called automatically when either our getDescription or getBackStory methods are called.

Overrides:
performLocalization in class KeyedItem
See Also:
KeyedItem.getDescription(), KeyedItem.getBackStory()


Copyright © 2001 Universe Dev Team All Rights Reserved.