|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.resource.ItemResource
org.mars_sim.msp.core.resource.Part
public class Part
The Part class represents a type of unit resource that is used for maintenance and repairs.
| Constructor Summary | |
|---|---|
Part(String name,
double mass)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getMaintenanceMaximumNumber(String entityName)
Gets the maximum number of this part needed by a maintenance entity. |
int |
getMaintenanceProbability(String entityName)
Gets the percentage probability of a part being needed by an maintenance entity. |
static Set<Part> |
getParts()
Gets a set of all parts. |
boolean |
hasMaintenanceEntity(String entityName)
Checks if the part has a maintenance entity of a given name. |
| Methods inherited from class org.mars_sim.msp.core.resource.ItemResource |
|---|
compareTo, createItemResource, equals, findItemResource, getItemResources, getMassPerItem, getName, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Part(String name,
double mass)
name - the name of the part.mass - the mass of the part (kg)| Method Detail |
|---|
public boolean hasMaintenanceEntity(String entityName)
entityName - the name of the entity.
public int getMaintenanceProbability(String entityName)
entityName - the name of the entity.
public int getMaintenanceMaximumNumber(String entityName)
entityName - the name of the entity.
public static Set<Part> getParts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||