|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.resource.AmountResource
public final class AmountResource
The AmountResource class represents a type of resource that is a material measured in mass kg.
| Constructor Summary | |
|---|---|
AmountResource(String name,
Phase phase,
boolean lifeSupport)
Constructor with life support parameter. |
|
| Method Summary | |
|---|---|
int |
compareTo(Resource o)
Compares this object with the specified object for order. |
boolean |
equals(Object object)
Checks if an object is equal to this object. |
static AmountResource |
findAmountResource(String name)
Finds an amount resource by name. |
static Set<AmountResource> |
getAmountResources()
Gets a ummutable set of all the amount resources. |
String |
getName()
Gets the resource's name |
Phase |
getPhase()
Gets the resources material phase. |
int |
hashCode()
Gets the hash code value. |
boolean |
isLifeSupport()
Checks if life support resource. |
String |
toString()
Returns the resource as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AmountResource(String name,
Phase phase,
boolean lifeSupport)
name - the resource's namephase - the material phase of the resource.lifeSupport - true if life support resource.| Method Detail |
|---|
public String getName()
getName in interface Resourcepublic String toString()
toString in class Objectpublic Phase getPhase()
public boolean isLifeSupport()
public static AmountResource findAmountResource(String name)
name - the name of the resource.
ResourceException - if resource could not be found.public static Set<AmountResource> getAmountResources()
public boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(Resource o)
compareTo in interface Comparable<Resource>o - the Object to be compared.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||