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 protectedAllocation(Entity entity, Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecreaseAllocation(int amountOfDecrease)ResourcegetAllocatedResource()Gets the resource that is associated with the allocationintgetAmountAllocated()The current amount allocatedEntitygetEntity()The Entity associated with the allocationprotected voidincreaseAllocation(int amountAllocated)booleanisAllocated()Returns true if there are units allocatedbooleanisDeallocated()Returns true if there are no units allocatedvoidnullify()protected voidsetAllocatedResource(Resource resource)protected voidsetEntity(Entity entity)java.lang.StringtoString()
-
-
-
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:
toStringin 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
-
-