Package net.bluemind.utils
Enum Class ByteSizeUnit
- All Implemented Interfaces:
Serializable
,Comparable<ByteSizeUnit>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract long
fromBytes
(long size) abstract long
fromGB
(long size) abstract long
fromKB
(long size) abstract long
fromMB
(long size) abstract long
fromPB
(long size) abstract long
fromTB
(long size) abstract String
abstract long
toBytes
(long size) abstract long
toGB
(long size) abstract long
toKB
(long size) abstract long
toMB
(long size) abstract long
toPB
(long size) abstract long
toTB
(long size) static ByteSizeUnit
Returns the enum constant of this class with the specified name.static ByteSizeUnit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BYTES
-
KB
-
MB
-
GB
-
TB
-
PB
-
-
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
-
toBytes
public abstract long toBytes(long size) -
toKB
public abstract long toKB(long size) -
toMB
public abstract long toMB(long size) -
toGB
public abstract long toGB(long size) -
toTB
public abstract long toTB(long size) -
toPB
public abstract long toPB(long size) -
fromBytes
public abstract long fromBytes(long size) -
fromKB
public abstract long fromKB(long size) -
fromMB
public abstract long fromMB(long size) -
fromGB
public abstract long fromGB(long size) -
fromTB
public abstract long fromTB(long size) -
fromPB
public abstract long fromPB(long size) -
getSuffix
-