Package com.marcpg.libpg.data.storage
Enum Class BitData.Unit
- All Implemented Interfaces:
Serializable
,Comparable<BitData.Unit>
,Constable
- Enclosing class:
- BitData
- Since:
- 0.0.1
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The format of data, so ^2 or ^10.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOne bit - on or offOne exabit - 1000 petabitOne exbibit - 1024 pebibitOne gibibit - 1024 mebibitOne gigabit - 1000 megabitOne kibibit - 1024 bitOne kilobit - 1000 bitOne mebibit - 1024 kibibitOne megabit - 1000 kilobitOne pebibit - 1024 tebibitOne petabit - 1000 terabitOne tebibit - 1024 gibibitOne terabit - 1000 gigabit -
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
eng()
The full english name of theunit
as listed in the english dictionary.@NotNull String
Same aseng()
, because the plural of bit is just bit.@NotNull String
toString()
Just the same aseng()
andpluralEng()
.static BitData.Unit
Returns the enum constant of this class with the specified name.static BitData.Unit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BIT
One bit - on or off -
KILOBIT
One kilobit - 1000 bit -
MEGABIT
One megabit - 1000 kilobit -
GIGABIT
One gigabit - 1000 megabit -
TERABIT
One terabit - 1000 gigabit -
PETABIT
One petabit - 1000 terabit -
EXABIT
One exabit - 1000 petabit -
KIBIBYTE
One kibibit - 1024 bit -
MEBIBYTE
One mebibit - 1024 kibibit -
GIBIBYTE
One gibibit - 1024 mebibit -
TEBIBYTE
One tebibit - 1024 gibibit -
PEBIBYTE
One pebibit - 1024 tebibit -
EXBIBYTE
One exbibit - 1024 pebibit
-
-
Field Details
-
bits
public final long bits -
abb
Theunit
's abbreviation. -
format
The unit's format
-
-
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
-
eng
- Returns:
- The english name.
-
pluralEng
Same aseng()
, because the plural of bit is just bit.- Returns:
- The english name.
-
toString
Just the same aseng()
andpluralEng()
.- Overrides:
toString
in classEnum<BitData.Unit>
-