org.gjt.universe
Class Star

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

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

Instances of this very simple class represent a star in the game. One or more stars can be found in a star system. This object does not keep track of the planets which orbit it -- this is handled by the star system in which the star is found.

Author:
Allan Noordvyk (noordvyk@home.com)
See Also:
SystemBase, Serialized Form

Field Summary
private  SimpleAccrete.StarMakeup myMakeup
           
private  java.lang.String myName
           
 
Constructor Summary
Star()
          Must allow default constructor for serialization to work.
Star(java.lang.String name, SimpleAccrete.StarMakeup sm)
          Designated constructor for instances of this class.
 
Method Summary
 java.lang.String getName()
          Returns the name of the receiving star.
 SimpleAccrete.StarMakeup getStarMakeup()
          Returns the stellar make-up of the receiving instance.
 void setName(java.lang.String newName)
          Sets the name of the receiving star.
 void setStarMakeup(SimpleAccrete.StarMakeup sm)
          Sets the stellar make-up of the receiving instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myName

private java.lang.String myName

myMakeup

private SimpleAccrete.StarMakeup myMakeup
Constructor Detail

Star

public Star(java.lang.String name,
            SimpleAccrete.StarMakeup sm)
Designated constructor for instances of this class.

Parameters:
name - The name of the system.
sm - Stellar make-up of system's star.
Throws:
SchemeUnkownException - When scheme is unable to generate necessary objects.

Star

public Star()
Must allow default constructor for serialization to work.

Method Detail

getName

public java.lang.String getName()
Returns the name of the receiving star.


setName

public void setName(java.lang.String newName)
Sets the name of the receiving star.

Parameters:
newName - The new name of the star.

getStarMakeup

public SimpleAccrete.StarMakeup getStarMakeup()
Returns the stellar make-up of the receiving instance.


setStarMakeup

public void setStarMakeup(SimpleAccrete.StarMakeup sm)
Sets the stellar make-up of the receiving instance.



Copyright © 2001 Universe Dev Team All Rights Reserved.