Class shipyardSpec

java.lang.Object
name.moore.kevin.ze.XMLdata.XMLbase
name.moore.kevin.ze.XMLdata.specs.shipyardSpec

public class shipyardSpec extends XMLbase
The read-only properties of a particular type of shipyard.

Process XML elements <shipyardSpec>...</shipyardSpec>

These properties are fixed and thus have no setter methods since there is no in-game reason to change them or create them.

Objects are initialised by loading XML via XStream.

More shipyards provide more production capacity and the ability to do things in parallel. An shipyards has a technical level - more advanced installations work faster and cheaper and can handle more advanced technology items.

Author:
Kevin Moore <dev@kevin.moore.name>
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • money

      @XStreamConverter(SingleValueMoneyConverter.class) private org.jscience.physics.amount.Amount<org.jscience.economics.money.Money> money
      The base cost of constructing this item.

      This may be modified by factors considered in the construction logic. It is always an exact value, no decimals.

      Optional element in XML <money>. Defaults to zero if not provided.
    • daystobuild

      private Integer daystobuild
      The base number of days to construct this industry.

      This value may be changed by construction systems which take into account things such as a damaged factory.

      Optional element in XML <daystobuild>. Defaults to 1.
  • Constructor Details

    • shipyardSpec

      public shipyardSpec()
  • Method Details

    • getMoney

      public org.jscience.physics.amount.Amount<org.jscience.economics.money.Money> getMoney()
      Returns:
    • getDaystobuild

      public Integer getDaystobuild()
      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: