Modifier and Type | Method and Description |
---|---|
static java.util.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() |
java.lang.String |
resource() |
java.lang.String |
toString() |
static Resource |
valueOf(java.lang.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.
|
public static final Resource CPU
public static final Resource NW_IN
public static final Resource NW_OUT
public static final Resource DISK
public static Resource[] values()
for (Resource c : Resource.values()) System.out.println(c);
public static Resource valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static java.util.List<Resource> cachedValues()
public java.lang.String resource()
public int id()
public boolean isHostResource()
public boolean isBrokerResource()
public double epsilon(double value1, double value2)
public java.lang.String toString()
toString
in class java.lang.Enum<Resource>