com.pegacat.vcf.data
Class WorldResource

java.lang.Object
  |
  +--com.pegacat.vcf.data.WorldResource
All Implemented Interfaces:
java.lang.Cloneable

public class WorldResource
extends java.lang.Object
implements java.lang.Cloneable

Represents available and potential resources on a world or moon. Creation date: (3/06/2001 9:21:46 PM)


Field Summary
static int ABUNDANT
           
static int COMMON
           
static int EXACT
           
static int NEGLIGIBLE
           
static int NONE
           
static int PLENTIFUL
           
static int[] QTYAVERAGES
          an average value for each of the numeric approximate quantity values
static java.lang.String[] QTYNAMES
          string name for each of the numeric approximate quantity values
static int RARE
           
protected  int remainingApprox
          approximate remaining amount, or EXACT if exact amount known.
protected  int remainingExact
          exact remaining amount if known
static int REPLENISHING
           
protected  ResourceType resource
          the resource
static int VERY_RARE
           
protected  int warehouse
           
 
Constructor Summary
WorldResource(java.lang.String name, java.lang.String remaining, int warehouse)
          Create a world resource record - analyses the 'remaining' string, and the warehouse level, and attempts to determine the resource type if not already known.
 
Method Summary
 java.lang.Object clone()
          Insert the method's description here.
 int getRemaining()
          Gets remining numeric level, either exact or approximate Creation date: (3/06/2001 9:25:26 PM)
 int getRemainingApprox()
           
 int getRemainingExact()
           
 java.lang.String getRemainingString()
          Gets remining level as string Creation date: (3/06/2001 9:25:26 PM)
 ResourceType getResource()
           
 int getWarehouse()
           
 void setRemainingApprox(int newRemainingApprox)
           
 void setRemainingExact(int newRemainingExact)
           
 void setResource(ResourceType newResource)
           
 void setWarehouse(int newWarehouse)
           
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

protected ResourceType resource
the resource

remainingExact

protected int remainingExact
exact remaining amount if known

remainingApprox

protected int remainingApprox
approximate remaining amount, or EXACT if exact amount known. one of the values from NEGLIGIBLE to REPLENISHING

EXACT

public static final int EXACT

NONE

public static final int NONE

NEGLIGIBLE

public static final int NEGLIGIBLE

VERY_RARE

public static final int VERY_RARE

RARE

public static final int RARE

COMMON

public static final int COMMON

PLENTIFUL

public static final int PLENTIFUL

ABUNDANT

public static final int ABUNDANT

REPLENISHING

public static final int REPLENISHING

QTYNAMES

public static final java.lang.String[] QTYNAMES
string name for each of the numeric approximate quantity values

QTYAVERAGES

public static final int[] QTYAVERAGES
an average value for each of the numeric approximate quantity values

warehouse

protected int warehouse
Constructor Detail

WorldResource

public WorldResource(java.lang.String name,
                     java.lang.String remaining,
                     int warehouse)
Create a world resource record - analyses the 'remaining' string, and the warehouse level, and attempts to determine the resource type if not already known.

Also converts the 'remaining' string into an exact or approximate quantity. Creation date: (3/06/2001 9:37:53 PM)

Method Detail

getRemainingApprox

public int getRemainingApprox()

getRemainingExact

public int getRemainingExact()

getRemaining

public int getRemaining()
Gets remining numeric level, either exact or approximate Creation date: (3/06/2001 9:25:26 PM)
Returns:
int

getRemainingString

public java.lang.String getRemainingString()
Gets remining level as string Creation date: (3/06/2001 9:25:26 PM)
Returns:
String

getResource

public ResourceType getResource()

getWarehouse

public int getWarehouse()

setRemainingApprox

public void setRemainingApprox(int newRemainingApprox)

setRemainingExact

public void setRemainingExact(int newRemainingExact)

setResource

public void setResource(ResourceType newResource)

setWarehouse

public void setWarehouse(int newWarehouse)

toString

public java.lang.String toString()
Returns a String that represents the value of this object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the receiver

clone

public java.lang.Object clone()
Insert the method's description here. Creation date: (14/06/2001 9:19:45 PM)
Overrides:
clone in class java.lang.Object
Returns:
java.lang.Object
Throws:
java.lang.CloneNotSupportedException - The exception description.