Package com.marcpg.libpg.data.storage
Enum Class ByteData.Unit
- All Implemented Interfaces:
Serializable
,Comparable<ByteData.Unit>
,Constable
- Enclosing class:
- ByteData
- 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 byte - 8 bitOne exabyte - 1000 petabyteOne exbibyte - 1024 pebibyteOne gibibyte - 1024 mebibyteOne gigabyte - 1000 megabyteOne kibibyte - 1024 byteOne kilobyte - 1000 byteOne mebibyte - 1024 kibibyteOne megabyte - 1000 kilobyteOne pebibyte - 1024 tebibyteOne petabyte - 1000 terabyteOne tebibyte - 1024 gibibyteOne terabyte - 1000 gigabyte -
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()
, but with an "s" at the end.@NotNull String
toString()
Just the same aseng()
andpluralEng()
.static ByteData.Unit
Returns the enum constant of this class with the specified name.static ByteData.Unit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BYTE
One byte - 8 bit -
KILOBYTE
One kilobyte - 1000 byte -
MEGABYTE
One megabyte - 1000 kilobyte -
GIGABYTE
One gigabyte - 1000 megabyte -
TERABYTE
One terabyte - 1000 gigabyte -
PETABYTE
One petabyte - 1000 terabyte -
EXABYTE
One exabyte - 1000 petabyte -
KIBIBYTE
One kibibyte - 1024 byte -
MEBIBYTE
One mebibyte - 1024 kibibyte -
GIBIBYTE
One gibibyte - 1024 mebibyte -
TEBIBYTE
One tebibyte - 1024 gibibyte -
PEBIBYTE
One pebibyte - 1024 tebibyte -
EXBIBYTE
One exbibyte - 1024 pebibyte
-
-
Field Details
-
bytes
public final long bytes -
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()
, but with an "s" at the end.- Returns:
- The english name in plural.
-
toString
Just the same aseng()
andpluralEng()
.- Overrides:
toString
in classEnum<ByteData.Unit>
-