com.swath
Class PlanetClass

java.lang.Object
  extended by com.swath.Info
      extended by com.swath.PlanetClass

public final class PlanetClass
extends Info

This class represents a planet class in TW.

Since:
SWATH 1.6

Method Summary
 java.lang.Object clone()
           
 int[] colos2build1()
          Gets the number of colonists needed to build one unit of each product type (Fuel Ore, Organics and Equipment).
 int colos2build1ftr()
          Gets the number of colonists needed to build one fighter.
 void dump()
          Dumps the planet class info in the terminal window.
 boolean equals(java.lang.Object obj)
           
 int[] maxAmounts()
          Gets the maximum amount of products that the planet class can have for each product type (Fuel Ore, Organics and Equipment).
 int[] maxColonists()
          Gets the maximum number of colonists for each product type (Fuel Ore, Organics and Equipment).
 int maxFighters()
          Gets the maximum amount of fighters that the planet can have.
 java.lang.String name()
          Gets the planet class name.
 int[] optimalColonists()
          Gets the optimal number of colonists for each product type (Fuel Ore, Organics and Equipment).
 java.lang.String toString()
           
 java.lang.String type()
          Gets the planet class type.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

type

public java.lang.String type()
                      throws java.lang.Exception
Gets the planet class type.

Returns:
The planet class type.
Throws:
java.lang.Exception
Since:
SWATH 1.6

name

public java.lang.String name()
                      throws java.lang.Exception
Gets the planet class name.

Returns:
The planet class name.
Throws:
java.lang.Exception
Since:
SWATH 1.6

colos2build1

public int[] colos2build1()
                   throws java.lang.Exception
Gets the number of colonists needed to build one unit of each product type (Fuel Ore, Organics and Equipment). The number of colonists is N_A if the product can't be built on this kind of planet.

Returns:
An array with the number of colonists needed per product.
Throws:
java.lang.Exception
Since:
SWATH 1.6
See Also:
colos2build1ftr(), Swath.FUEL_ORE, Swath.ORGANICS, Swath.EQUIPMENT, Swath.N_A

colos2build1ftr

public int colos2build1ftr()
                    throws java.lang.Exception
Gets the number of colonists needed to build one fighter. The number of colonists is N_A if no fighters can be built on this kind of planet.

Returns:
The number of colonists needed per fighter.
Throws:
java.lang.Exception
Since:
SWATH 1.9.5
See Also:
colos2build1(), Swath.N_A

maxAmounts

public int[] maxAmounts()
                 throws java.lang.Exception
Gets the maximum amount of products that the planet class can have for each product type (Fuel Ore, Organics and Equipment).

Returns:
An array with the maximum product amounts.
Throws:
java.lang.Exception
Since:
SWATH 1.6
See Also:
maxFighters(), Swath.FUEL_ORE, Swath.ORGANICS, Swath.EQUIPMENT

maxFighters

public int maxFighters()
                throws java.lang.Exception
Gets the maximum amount of fighters that the planet can have.

Returns:
The maximum amount of fighters.
Throws:
java.lang.Exception
Since:
SWATH 1.9.5
See Also:
maxAmounts()

maxColonists

public int[] maxColonists()
                   throws java.lang.Exception
Gets the maximum number of colonists for each product type (Fuel Ore, Organics and Equipment). The number of colonists is N_A if the maximum number of colonists is not available.

Returns:
An array with the maximum number of colonists per product.
Throws:
java.lang.Exception
Since:
SWATH 1.9.5
See Also:
optimalColonists(), Swath.FUEL_ORE, Swath.ORGANICS, Swath.EQUIPMENT, Swath.N_A

optimalColonists

public int[] optimalColonists()
                       throws java.lang.Exception
Gets the optimal number of colonists for each product type (Fuel Ore, Organics and Equipment). The number of colonists is N_A if the optimal number of colonists is not available.

Returns:
An array with the optimal number of colonists per product.
Throws:
java.lang.Exception
Since:
SWATH 1.9.5
See Also:
maxColonists(), Swath.FUEL_ORE, Swath.ORGANICS, Swath.EQUIPMENT, Swath.N_A

dump

public void dump()
          throws java.lang.Exception
Dumps the planet class info in the terminal window.

Throws:
java.lang.Exception
Since:
SWATH 1.6