public class Resource
extends java.lang.Object
Constructor and Description |
---|
Resource(java.lang.Double ram,
java.lang.Double disk,
java.lang.Double cpu)
Create a resource
|
Resource(java.lang.Double ram,
java.lang.Double disk,
java.lang.Double cpu,
java.lang.Integer idx)
Create a resource
|
Modifier and Type | Method and Description |
---|---|
Resource |
cloneWithRam(double newRam) |
boolean |
equals(java.lang.Object o) |
java.lang.Double |
getCpu() |
java.lang.Double |
getDisk() |
int |
getId()
Get the unique id of the resource
|
java.lang.Double |
getRam() |
int |
hashCode() |
void |
setCpu(java.lang.Double cpu) |
void |
setDisk(java.lang.Double disk) |
void |
setRam(java.lang.Double ram) |
public Resource(java.lang.Double ram, java.lang.Double disk, java.lang.Double cpu)
ram
- ram amountdisk
- disk amountcpu
- cpu amoutpublic Resource(java.lang.Double ram, java.lang.Double disk, java.lang.Double cpu, java.lang.Integer idx)
ram
- ram amountdisk
- disk amountcpu
- cpu amoutidx
- resource idpublic int getId()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Double getRam()
public void setRam(java.lang.Double ram)
public java.lang.Double getDisk()
public void setDisk(java.lang.Double disk)
public java.lang.Double getCpu()
public void setCpu(java.lang.Double cpu)
public Resource cloneWithRam(double newRam)