public enum Resource extends Enum<Resource>
Enum Constant and Description |
---|
CPU |
DISK |
NW_IN |
NW_OUT |
PRODUCE_IN |
Modifier and Type | Method and Description |
---|---|
static List<Resource> |
cachedValues()
Use this instead of values() because values() creates a new array each time.
|
double |
epsilon(double value1,
double value2) |
int |
id() |
boolean |
isBrokerResource() |
boolean |
isHostResource() |
String |
resource() |
String |
toString() |
String |
unit() |
static Resource |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Resource[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
<T> T |
visit(ResourceVisitor<T> visitor) |
public static final Resource CPU
public static final Resource NW_IN
public static final Resource NW_OUT
public static final Resource DISK
public static final Resource PRODUCE_IN
public static Resource[] values()
for (Resource c : Resource.values()) System.out.println(c);
public static Resource valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static List<Resource> cachedValues()
public String resource()
public int id()
public String unit()
public boolean isHostResource()
public boolean isBrokerResource()
public double epsilon(double value1, double value2)
public <T> T visit(ResourceVisitor<T> visitor)