Package com.perfino.annotation
Enum Class Unit
- All Implemented Interfaces:
Serializable
,Comparable<Unit>
,Constable
Telemetry unit used in the
TelemetryFormat
annotation.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe monitored value has the unit "bytes".The monitored value has the unit "microseconds".The monitored value has the unit "milliseconds".The monitored value has the unit "nanoseconds".The monitored value has the unit "per second".The monitored value has the unit "percent".The monitored value is a unitless number. -
Method Summary
-
Enum Constant Details
-
PLAIN
The monitored value is a unitless number. -
PER_SECOND
The monitored value has the unit "per second". Conversion into the units "per-minute" and "per-hour" is done automatically as required. In practice, this conversion would occur ifTelemetryFormat.scale()
is set to a negative number. -
PERCENT
The monitored value has the unit "percent". To show two decimal digits, setTelemetryFormat.scale()
to2
. -
MILLISECONDS
The monitored value has the unit "milliseconds". Conversion into higher unit prefixes such as seconds or minutes is done automatically as required. -
MICROSECONDS
The monitored value has the unit "microseconds". Conversion into higher unit prefixes such as seconds or minutes is done automatically as required. -
NANOSECONDS
The monitored value has the unit "nanoseconds". Conversion into higher unit prefixes such as microseconds or milliseconds is done automatically as required. -
BYTES
The monitored value has the unit "bytes". Conversion into higher unit prefixes such as kB, MB or GB is done automatically as required.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-