public enum DataUnit extends Enum<DataUnit>
| Modifier and Type | Method and Description |
|---|---|
int |
toBytes(int value) |
int |
toGB(int value) |
int |
toKB(int value) |
int |
toMB(int value) |
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 BYTE
public static final DataUnit KB
public static final DataUnit MB
public static final DataUnit GB
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 int toBytes(int value)
value - an scalar amount of informationvalue in bytespublic int toKB(int value)
value - an scalar amount of informationvalue in KBpublic int toMB(int value)
value - an scalar amount of informationvalue in MBpublic int toGB(int value)
value - an scalar amount of informationvalue in GBCopyright © 2017 MuleSoft, Inc.. All rights reserved.