Class star

java.lang.Object
name.moore.kevin.ze.XMLdata.XMLbase
name.moore.kevin.ze.XMLdata.star

public class star extends XMLbase
A star has a unique key eg "Sol", type (a stellar spec ) optional description and may have planets associated with it. XML structure:-
<star key="\Romulus\" spec=\"G\">
 <description/>...
 <star>
Author:
Kevin Moore <dev@kevin.moore.name>
  • Field Details

  • Constructor Details

    • star

      public star()
  • Method Details

    • getSpec

      public reference getSpec()
      Description copied from class: XMLbase
      Derived classes override if they really do want to return a spec reference.
      Overrides:
      getSpec in class XMLbase
      Returns:
    • getCoord

      public com.jme3.math.Vector2f getCoord()
      Returns:
    • readResolve

      protected Object readResolve()
      Description copied from class: XMLbase
      Called automatically when loading from XML as part of JDK serialisation.

      Used to do some validation of that incoming XML by asserting that properties are set and have defaults as required. Output warning messages if a default is applied. Output error messages if a required XML element is missing and return null to indicate an invalid object.

      Overrides:
      readResolve in class XMLbase
      Returns:
      null if we can't create a valid object
    • getEntityClass

      public Class getEntityClass()
      Description copied from class: XMLbase
      Derived classes have to override this and say what class eg engine.class they are. This allows us to use this base class but discover the derived class.
      Specified by:
      getEntityClass in class XMLbase
      Returns: