Package com.infilos.utils
Enum DataSize.DataUnit
- java.lang.Object
-
- java.lang.Enum<DataSize.DataUnit>
-
- com.infilos.utils.DataSize.DataUnit
-
- All Implemented Interfaces:
Serializable
,Comparable<DataSize.DataUnit>
- Enclosing class:
- DataSize
public static enum DataSize.DataUnit extends Enum<DataSize.DataUnit>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
factor()
String
unitString()
static DataSize.DataUnit
valueOf(String name)
Returns the enum constant of this type with the specified name.static DataSize.DataUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BYTE
public static final DataSize.DataUnit BYTE
-
KILOBYTE
public static final DataSize.DataUnit KILOBYTE
-
MEGABYTE
public static final DataSize.DataUnit MEGABYTE
-
GIGABYTE
public static final DataSize.DataUnit GIGABYTE
-
TERABYTE
public static final DataSize.DataUnit TERABYTE
-
PETABYTE
public static final DataSize.DataUnit PETABYTE
-
-
Method Detail
-
values
public static DataSize.DataUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataSize.DataUnit c : DataSize.DataUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataSize.DataUnit valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
factor
public long factor()
-
unitString
public String unitString()
-
-