|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.resource.AmountResourceStorage
public class AmountResourceStorage
Storage for amount resources.
Constructor Summary | |
---|---|
AmountResourceStorage()
|
Method Summary | |
---|---|
void |
addAmountResourcePhaseCapacity(Phase phase,
double capacity)
Adds capacity for a resource phase. |
void |
addAmountResourceTypeCapacity(AmountResource resource,
double capacity)
Adds capacity for a resource type. |
java.util.Set<AmountResource> |
getAllAmountResourcesStored()
Gets all of the amount resources stored. |
double |
getAmountResourceCapacity(AmountResource resource)
Gets the storage capacity for a resource. |
java.util.Map<Phase,java.lang.Double> |
getAmountResourcePhaseCapacities()
Gets the phase capacities in storage. |
double |
getAmountResourceRemainingCapacity(AmountResource resource)
Gets the remaining capacity available for a resource. |
double |
getAmountResourceStored(AmountResource resource)
Gets the amount of a resource stored. |
java.util.Map<AmountResource,java.lang.Double> |
getAmountResourceTypeCapacities()
Gets the amount resources and the type capacity for them. |
double |
getTotalAmountResourcesStored()
Gets the total amount of resources stored. |
boolean |
hasAmountResourceCapacity(AmountResource resource)
Checks if storage has capacity for a resource. |
void |
retrieveAmountResource(AmountResource resource,
double amount)
Retrieves an amount of a resource from storage. |
void |
storeAmountResource(AmountResource resource,
double amount)
Store an amount of a resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AmountResourceStorage()
Method Detail |
---|
public void addAmountResourceTypeCapacity(AmountResource resource, double capacity) throws ResourceException
resource
- the resource.capacity
- the capacity amount (kg).
ResourceException
- if error setting capacity.public java.util.Map<AmountResource,java.lang.Double> getAmountResourceTypeCapacities()
public void addAmountResourcePhaseCapacity(Phase phase, double capacity) throws ResourceException
phase
- the phasecapacity
- the capacity amount (kg).
ResourceException
- if error adding capacity.public java.util.Map<Phase,java.lang.Double> getAmountResourcePhaseCapacities()
public boolean hasAmountResourceCapacity(AmountResource resource)
resource
- the resource.
public double getAmountResourceCapacity(AmountResource resource)
resource
- the resource.
public double getAmountResourceStored(AmountResource resource)
resource
- the resource.
public java.util.Set<AmountResource> getAllAmountResourcesStored()
public double getTotalAmountResourcesStored()
public double getAmountResourceRemainingCapacity(AmountResource resource)
resource
- the resource.
public void storeAmountResource(AmountResource resource, double amount) throws ResourceException
resource
- the resource.amount
- the amount (kg).
ResourceException
- if error storing resource.public void retrieveAmountResource(AmountResource resource, double amount) throws ResourceException
resource
- the resource.amount
- the amount (kg).
ResourceException
- if error retrieving resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |