Package ai.dat.core.configuration
Enum Class MemorySize.MemoryUnit
- All Implemented Interfaces:
Serializable,Comparable<MemorySize.MemoryUnit>,Constable
- Enclosing class:
- MemorySize
Enum which defines memory unit, mostly used to parse value from configuration file.
To make larger values more compact, the common size suffixes are supported:
- 1b or 1bytes (bytes)
- 1k or 1kb or 1kibibytes (interpreted as kibibytes = 1024 bytes)
- 1m or 1mb or 1mebibytes (interpreted as mebibytes = 1024 kibibytes)
- 1g or 1gb or 1gibibytes (interpreted as gibibytes = 1024 mebibytes)
- 1t or 1tb or 1tebibytes (interpreted as tebibytes = 1024 gibibytes)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic booleanstatic MemorySize.MemoryUnitReturns the enum constant of this class with the specified name.static MemorySize.MemoryUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BYTES
-
KILO_BYTES
-
MEGA_BYTES
-
GIGA_BYTES
-
TERA_BYTES
-
-
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
-
getAllUnits
-
hasUnit
-