public static enum DataStorageSpec.DataStorageUnit extends java.lang.Enum<DataStorageSpec.DataStorageUnit>
Enum Constant and Description |
---|
BYTES |
GIBIBYTES |
KIBIBYTES |
MEBIBYTES |
Modifier and Type | Method and Description |
---|---|
long |
convert(long source,
DataStorageSpec.DataStorageUnit sourceUnit) |
static DataStorageSpec.DataStorageUnit |
fromSymbol(java.lang.String symbol) |
long |
toBytes(long d) |
long |
toGibibytes(long d) |
long |
toKibibytes(long d) |
long |
toMebibytes(long d) |
static DataStorageSpec.DataStorageUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataStorageSpec.DataStorageUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataStorageSpec.DataStorageUnit BYTES
public static final DataStorageSpec.DataStorageUnit KIBIBYTES
public static final DataStorageSpec.DataStorageUnit MEBIBYTES
public static final DataStorageSpec.DataStorageUnit GIBIBYTES
public static DataStorageSpec.DataStorageUnit[] values()
for (DataStorageSpec.DataStorageUnit c : DataStorageSpec.DataStorageUnit.values()) System.out.println(c);
public static DataStorageSpec.DataStorageUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static DataStorageSpec.DataStorageUnit fromSymbol(java.lang.String symbol)
symbol
- the unit symbolpublic long toBytes(long d)
public long toKibibytes(long d)
public long toMebibytes(long d)
public long toGibibytes(long d)
public long convert(long source, DataStorageSpec.DataStorageUnit sourceUnit)
Copyright © 2009-2022 The Apache Software Foundation