public enum DataUnit extends Enum<DataUnit>
Enum Constant and Description |
---|
BYTES
Bytes.
|
GIGABYTES
Gigabytes.
|
KILOBYTES
Kilobytes.
|
MEGABYTES
Megabytes.
|
TERABYTES
Terabytes.
|
Modifier and Type | Method and Description |
---|---|
static DataUnit |
fromSuffix(String suffix)
Return the
DataUnit matching the specified suffix . |
static DataUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataUnit BYTES
public static final DataUnit KILOBYTES
public static final DataUnit MEGABYTES
public static final DataUnit GIGABYTES
public static final DataUnit TERABYTES
public static DataUnit[] values()
for (DataUnit c : DataUnit.values()) System.out.println(c);
public static DataUnit 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 static DataUnit fromSuffix(String suffix)
DataUnit
matching the specified suffix
.suffix
- one of the standard suffixDataUnit
matching the specified suffix
IllegalArgumentException
- if the suffix does not match any
of this enum's constants