Enum SampleUnits
- java.lang.Object
-
- java.lang.Enum<SampleUnits>
-
- com.opencloud.rhino.facilities.usage.SampleUnits
-
- All Implemented Interfaces:
Serializable
,Comparable<SampleUnits>
public enum SampleUnits extends Enum<SampleUnits>
Source and display units for a sample usage parameter.
- Since:
- Rhino 2.4.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COUNT
The sample value is a dimensionless count.MILLISECONDS
The sample value is a time in milliseconds.NANOSECONDS
The sample value is a time in nanoseconds.SECONDS
The sample value is a time in seconds.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Get the descriptive name for the units value.static SampleUnits
valueOf(String name)
Returns the enum constant of this type with the specified name.static SampleUnits[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COUNT
public static final SampleUnits COUNT
The sample value is a dimensionless count. The descriptive name for this value is "count".
- Since:
- Rhino 2.4.0
-
SECONDS
public static final SampleUnits SECONDS
The sample value is a time in seconds. The descriptive name for this value is "time/seconds".
- Since:
- Rhino 2.4.0
-
MILLISECONDS
public static final SampleUnits MILLISECONDS
The sample value is a time in milliseconds. The descriptive name for this value is "time/milliseconds".
- Since:
- Rhino 2.4.0
-
NANOSECONDS
public static final SampleUnits NANOSECONDS
The sample value is a time in nanoseconds. The descriptive name for this value is "time/nanoseconds".
- Since:
- Rhino 2.4.0
-
-
Method Detail
-
values
public static SampleUnits[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SampleUnits c : SampleUnits.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SampleUnits valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDescription
public String getDescription()
Get the descriptive name for the units value.
- Returns:
- the descriptive name.
- Since:
- Rhino 2.4.0
-
-