org.mars_sim.msp.simulation.resource
Class Phase

java.lang.Object
  extended by org.mars_sim.msp.simulation.resource.Phase
All Implemented Interfaces:
java.io.Serializable

public final class Phase
extends java.lang.Object
implements java.io.Serializable

A phase of an amount resource.

See Also:
Serialized Form

Field Summary
static Phase GAS
           
static Phase LIQUID
           
static Phase SOLID
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks if an object is equal to this object.
static Phase findPhase(java.lang.String name)
          Finds a phase by name.
 java.lang.String getName()
          Gets the name of the phase.
static java.util.Set<Phase> getPhases()
          Gets a ummutable set of all the phases.
 int hashCode()
          Gets the hash code value.
 java.lang.String toString()
          Gets the string value for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GAS

public static final Phase GAS

LIQUID

public static final Phase LIQUID

SOLID

public static final Phase SOLID
Method Detail

getName

public java.lang.String getName()
Gets the name of the phase.

Returns:
name

findPhase

public static final Phase findPhase(java.lang.String name)
                             throws java.lang.Exception
Finds a phase by name.

Parameters:
name - the name of the phase.
Returns:
phase
Throws:
java.lang.Exception - if phase could not be found.

getPhases

public static final java.util.Set<Phase> getPhases()
Gets a ummutable set of all the phases.

Returns:
set of phases.

equals

public boolean equals(java.lang.Object object)
Checks if an object is equal to this object.

Overrides:
equals in class java.lang.Object
Returns:
true if equal

hashCode

public int hashCode()
Gets the hash code value.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Gets the string value for the object.

Overrides:
toString in class java.lang.Object