Package org.apache.hadoop.conf
Enum Class StorageUnit
- All Implemented Interfaces:
Serializable,Comparable<StorageUnit>,Constable
Class that maintains different forms of Storage Units.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract doublefromBytes(double value) abstract doublegetDefault(double value) abstract Stringabstract Stringabstract Stringabstract doubletoBytes(double value) abstract doubletoEBs(double value) abstract doubletoGBs(double value) abstract doubletoKBs(double value) abstract doubletoMBs(double value) abstract doubletoPBs(double value) toString()abstract doubletoTBs(double value) static StorageUnitReturns the enum constant of this class with the specified name.static StorageUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EB
-
PB
-
TB
-
GB
-
MB
-
KB
-
BYTES
-
-
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 double toBytes(double value) -
toKBs
public abstract double toKBs(double value) -
toMBs
public abstract double toMBs(double value) -
toGBs
public abstract double toGBs(double value) -
toTBs
public abstract double toTBs(double value) -
toPBs
public abstract double toPBs(double value) -
toEBs
public abstract double toEBs(double value) -
getLongName
-
getShortName
-
getSuffixChar
-
getDefault
public abstract double getDefault(double value) -
fromBytes
public abstract double fromBytes(double value) -
toString
- Overrides:
toStringin classEnum<StorageUnit>
-