Enum Capacity
- All Implemented Interfaces:
Serializable
,Comparable<Capacity>
,java.lang.constant.Constable
Defines values for Capacity.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEnum value 500.Enum value 5000.Enum value 1000.Enum value 2000. -
Method Summary
Modifier and TypeMethodDescriptionstatic Capacity
fromLong
(long value) Parses a serialized value to a Capacity instance.long
toLong()
De-serializes the instance to long value.static Capacity
Returns the enum constant of this type with the specified name.static Capacity[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FIVE_ZERO_ZERO
Enum value 500. -
ONE_ZERO_ZERO_ZERO
Enum value 1000. -
TWO_ZERO_ZERO_ZERO
Enum value 2000. -
FIVE_ZERO_ZERO_ZERO
Enum value 5000.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
fromLong
Parses a serialized value to a Capacity instance.- Parameters:
value
- the serialized value to parse.- Returns:
- the parsed Capacity object, or null if unable to parse.
-
toLong
public long toLong()De-serializes the instance to long value.- Returns:
- the long value.
-