org.gjt.universe
Class PlanetType

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

public class PlanetType
extends Classification

See Also:
Serialized Form

Field Summary
private static java.util.Vector allInstances
           
private  AtmosphereType myAtmosphereType
           
private  GravityType myGravityType
           
private  TemperatureType myTemperatureType
           
private  TerrainType myTerrainType
           
 
Fields inherited from class org.gjt.universe.Classification
 
Constructor Summary
protected PlanetType(java.lang.String aName, java.lang.String aBackStory, GravityType aGravityType, AtmosphereType aAtmosphereType, TemperatureType aTemperatureType, TerrainType aTerrainType)
          This constructor is used to construct instances of this class.
 
Method Summary
private static java.lang.String compositeName(GravityType aGravityType, AtmosphereType aAtmosphereType, TemperatureType aTemperatureType, TerrainType aTerrainType)
          This method returns the briefest possible name describing the particular collection of sub-classifications.
 AtmosphereType getAtmosphereType()
          This method returns the classification of the planet's atmosphere.
 java.awt.Color getColor()
           
 GravityType getGravityType()
          This method returns the classification of the planet's surface gravity.
 TemperatureType getTemperatureType()
          This method returns the classification of the planet's surface temperature.
 TerrainType getTerrainType()
          This method returns the classification of the planet's surface terrain.
static PlanetType instanceForMakeup(SimpleAccrete.PlanetaryMakeup aMakeup)
          This class method returns the planet type instance which best matches the given planetary make-up.
static PlanetType sharedInstance(GravityType aGravityType, AtmosphereType aAtmosphereType, TemperatureType aTemperatureType, TerrainType aTerrainType)
          This method returns the shared instance which matches the given set of subclassifications, creating the new instance if necessary.
 
Methods inherited from class org.gjt.universe.Classification
getBackStory, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allInstances

private static java.util.Vector allInstances

myGravityType

private GravityType myGravityType

myAtmosphereType

private AtmosphereType myAtmosphereType

myTemperatureType

private TemperatureType myTemperatureType

myTerrainType

private TerrainType myTerrainType
Constructor Detail

PlanetType

protected PlanetType(java.lang.String aName,
                     java.lang.String aBackStory,
                     GravityType aGravityType,
                     AtmosphereType aAtmosphereType,
                     TemperatureType aTemperatureType,
                     TerrainType aTerrainType)
This constructor is used to construct instances of this class. It should not be necessary for callers to invoke this directly, since all planet types should be created automatically.

Parameters:
aName - The short localized name of the planet type.
aBackStory - A localized description of the planet type.
Method Detail

instanceForMakeup

public static PlanetType instanceForMakeup(SimpleAccrete.PlanetaryMakeup aMakeup)
This class method returns the planet type instance which best matches the given planetary make-up.

Parameters:
aMakeup - A planetary make-up to be matched against.

sharedInstance

public static PlanetType sharedInstance(GravityType aGravityType,
                                        AtmosphereType aAtmosphereType,
                                        TemperatureType aTemperatureType,
                                        TerrainType aTerrainType)
This method returns the shared instance which matches the given set of subclassifications, creating the new instance if necessary.


compositeName

private static java.lang.String compositeName(GravityType aGravityType,
                                              AtmosphereType aAtmosphereType,
                                              TemperatureType aTemperatureType,
                                              TerrainType aTerrainType)
This method returns the briefest possible name describing the particular collection of sub-classifications.


getGravityType

public GravityType getGravityType()
This method returns the classification of the planet's surface gravity.


getAtmosphereType

public AtmosphereType getAtmosphereType()
This method returns the classification of the planet's atmosphere.


getTemperatureType

public TemperatureType getTemperatureType()
This method returns the classification of the planet's surface temperature.


getTerrainType

public TerrainType getTerrainType()
This method returns the classification of the planet's surface terrain.


getColor

public java.awt.Color getColor()


Copyright © 2001 Universe Dev Team All Rights Reserved.