Package jsl.modeling.elements.entity
Class Allocation
- java.lang.Object
-
- jsl.modeling.elements.entity.Allocation
-
public class Allocation extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Allocation(Entity entity, Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decreaseAllocation(int amountOfDecrease)
Resource
getAllocatedResource()
Gets the resource that is associated with the allocationint
getAmountAllocated()
The current amount allocatedEntity
getEntity()
The Entity associated with the allocationprotected void
increaseAllocation(int amountAllocated)
boolean
isAllocated()
Returns true if there are units allocatedboolean
isDeallocated()
Returns true if there are no units allocatedvoid
nullify()
protected void
setAllocatedResource(Resource resource)
protected void
setEntity(Entity entity)
java.lang.String
toString()
-
-
-
Method Detail
-
nullify
public final void nullify()
-
setEntity
protected final void setEntity(Entity entity)
-
setAllocatedResource
protected final void setAllocatedResource(Resource resource)
-
increaseAllocation
protected final void increaseAllocation(int amountAllocated)
-
decreaseAllocation
protected final void decreaseAllocation(int amountOfDecrease)
-
getAmountAllocated
public final int getAmountAllocated()
The current amount allocated- Returns:
-
isAllocated
public final boolean isAllocated()
Returns true if there are units allocated- Returns:
-
isDeallocated
public final boolean isDeallocated()
Returns true if there are no units allocated- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getEntity
public final Entity getEntity()
The Entity associated with the allocation- Returns:
-
getAllocatedResource
public final Resource getAllocatedResource()
Gets the resource that is associated with the allocation- Returns:
- The resource
-
-