Serializable
, Comparable<MemoryUnit>
public enum MemoryUnit extends Enum<MemoryUnit>
Enum Constant | Description |
---|---|
EXBI_BYTE |
The exbibyte is a multiple of the unit byte for digital information.
|
GIBI_BYTE |
The gibibyte is a multiple of the unit byte for digital information.
|
KIBI_BYTE |
The kibibyte is a multiple of the unit byte for digital information.
|
MEBI_BYTE |
The mebibyte is a multiple of the unit byte for digital information.
|
PEBI_BYTE |
The pebibyte is a multiple of the unit byte for digital information.
|
TEBI_BYTE |
The tebibyte is a multiple of the unit byte for digital information.
|
YOBI_BYTE |
The yobibyte is a multiple of the unit byte for digital information.
|
ZEBI_BYTE |
The zebibyte is a multiple of the unit byte for digital information.
|
Modifier and Type | Method | Description |
---|---|---|
static MemoryUnit |
extract(double value) |
Extracts the closest equivalent in Bytes.
|
double |
getByteValue() |
Returns the number of bytes in the unit.
|
static MemoryUnit |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static MemoryUnit[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemoryUnit KIBI_BYTE
public static final MemoryUnit MEBI_BYTE
public static final MemoryUnit GIBI_BYTE
public static final MemoryUnit TEBI_BYTE
public static final MemoryUnit PEBI_BYTE
public static final MemoryUnit EXBI_BYTE
public static final MemoryUnit ZEBI_BYTE
public static final MemoryUnit YOBI_BYTE
public static MemoryUnit[] values()
for (MemoryUnit c : MemoryUnit.values()) System.out.println(c);
public static MemoryUnit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic double getByteValue()
public static MemoryUnit extract(double value)
value
- for which the byte equivalent is to be extractedIllegalArgumentException
- when a negative number is passedCopyright © 2008, 2018, Shaiksphere Inc.. All rights reserved.