public enum MemoryUnit extends Enum<MemoryUnit>
Enum Constant and Description |
---|
BYTES |
EXABYTES |
GIGABYTES |
KILOBYTES |
MEGABYTES |
PETABYTES |
TERABYTES |
Modifier and Type | Method and Description |
---|---|
long |
convert(long memory,
MemoryUnit unit)
Convert the given memory capacity in the given unit to this unit.
|
long |
convert(String memoryCapacity) |
String |
getPostfix() |
long |
toBytes(long memory)
Equivalent to BYTES.convert(memory, this).
|
static long |
toBytes(String memory) |
long |
toExaBytes(long memory)
Equivalent to EXABYTES.convert(memory, this).
|
static long |
toExaBytes(String memory) |
long |
toGigaBytes(long memory)
Equivalent to GIGABYTES.convert(memory, this).
|
static long |
toGigaBytes(String memory) |
long |
toKiloBytes(long memory)
Equivalent to KILOBYTES.convert(memory, this).
|
static long |
toKiloBytes(String memory) |
long |
toMegaBytes(long memory)
Equivalent to MEGABYTES.convert(memory, this).
|
static long |
toMegaBytes(String memory) |
long |
toPetaBytes(long memory)
Equivalent to PETABYTES.convert(memory, this).
|
static long |
toPetaBytes(String memory) |
String |
toPostfix() |
long |
toTeraBytes(long memory)
Equivalent to TERABYTES.convert(memory, this).
|
static long |
toTeraBytes(String memory) |
static MemoryUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MemoryUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemoryUnit BYTES
public static final MemoryUnit KILOBYTES
public static final MemoryUnit MEGABYTES
public static final MemoryUnit GIGABYTES
public static final MemoryUnit TERABYTES
public static final MemoryUnit PETABYTES
public static final MemoryUnit EXABYTES
public static MemoryUnit[] values()
for (MemoryUnit c : MemoryUnit.values()) System.out.println(c);
public static MemoryUnit 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 long convert(long memory, MemoryUnit unit)
memory
- capacity in the given unitunit
- the unit of the memory argumentpublic long toBytes(long memory)
memory
- the memory to convert to Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toBytes(String memory)
public long convert(String memoryCapacity)
public long toKiloBytes(long memory)
memory
- the memory to convert to Kilo Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toKiloBytes(String memory)
public long toMegaBytes(long memory)
memory
- the memory to convert to Mega Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toMegaBytes(String memory)
public long toGigaBytes(long memory)
memory
- the memory to convert to Giga Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toGigaBytes(String memory)
public long toTeraBytes(long memory)
memory
- the memory to convert to Tera Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toTeraBytes(String memory)
public long toPetaBytes(long memory)
memory
- the memory to convert to Peta Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toPetaBytes(String memory)
public long toExaBytes(long memory)
memory
- the memory to convert to Exa Bytesconvert(long, org.openspaces.core.util.MemoryUnit)
public static long toExaBytes(String memory)
public String toPostfix()
public String getPostfix()
Copyright © GigaSpaces.