org.cloudbus.cloudsim.resources.ResourceNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsim-plus Show documentation
Show all versions of cloudsim-plus Show documentation
CloudSim Plus: A modern, highly extensible and easier-to-use Java 8 Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services
package org.cloudbus.cloudsim.resources;
/**
* A class that implements the Null Object Design Pattern for {@link Resource}
* class.
*
* @author Manoel Campos da Silva Filho
* @see Resource#NULL
*/
final class ResourceNull implements Resource {
@Override public long getAvailableResource() { return 0; }
@Override public long getAllocatedResource() {
return 0;
}
@Override public boolean isAmountAvailable(long amountToCheck) {
return false;
}
@Override public String getUnit() { return ""; }
@Override public boolean isFull() {
return false;
}
@Override public long getCapacity() {
return 0;
}
}