ResourceAbstract

public abstract class ResourceAbstract implements Resource

An abstract implementation of a Resource.

Author:Manoel Campos da Silva Filho

Fields

capacity

protected long capacity

See also: .getCapacity()

Constructors

ResourceAbstract

public ResourceAbstract(long capacity)

Methods

getAllocatedResource

public long getAllocatedResource()

getCapacity

public long getCapacity()

isAmountAvailable

public boolean isAmountAvailable(long amountToCheck)

isAmountAvailable

public boolean isAmountAvailable(double amountToCheck)

isResourceAmountBeingUsed

public boolean isResourceAmountBeingUsed(long amountToCheck)

isSuitable

public boolean isSuitable(long newTotalAllocatedResource)