ResourceManageableNull

final class ResourceManageableNull implements ResourceManageable

A class that implements the Null Object Design Pattern for ResourceManageable class.

Author:Manoel Campos da Silva Filho

See also: ResourceManageable.NULL

Methods

addCapacity

public boolean addCapacity(long capacityToAdd)

allocateResource

public boolean allocateResource(long amountToAllocate)

deallocateAllResources

public long deallocateAllResources()

deallocateAndRemoveResource

public boolean deallocateAndRemoveResource(long amountToDeallocate)

deallocateResource

public boolean deallocateResource(long amountToDeallocate)

getAllocatedResource

public long getAllocatedResource()

getAvailableResource

public long getAvailableResource()

getCapacity

public long getCapacity()

isAmountAvailable

public boolean isAmountAvailable(long amountToCheck)

isAmountAvailable

public boolean isAmountAvailable(double amountToCheck)

isFull

public boolean isFull()

isResourceAmountBeingUsed

public boolean isResourceAmountBeingUsed(long amountToCheck)

isSuitable

public boolean isSuitable(long newTotalAllocatedResource)

removeCapacity

public boolean removeCapacity(long capacityToRemove)

setAllocatedResource

public boolean setAllocatedResource(long newTotalAllocatedResource)

setCapacity

public boolean setCapacity(long newCapacity)