public enum MemoryUnit extends Enum<MemoryUnit>
MemorySize
Enum Constant and Description |
---|
BYTES
MemoryUnit in bytes
|
GIGABYTES
MemoryUnit in gigabytes
|
KILOBYTES
MemoryUnit in kilobytes
|
MEGABYTES
MemoryUnit in megabytes
|
Modifier and Type | Method and Description |
---|---|
abstract long |
convert(long value,
MemoryUnit m) |
abstract long |
toBytes(long value) |
abstract long |
toGigaBytes(long value) |
abstract long |
toKiloBytes(long value) |
abstract long |
toMegaBytes(long value) |
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 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 abstract long convert(long value, MemoryUnit m)
public abstract long toBytes(long value)
public abstract long toKiloBytes(long value)
public abstract long toMegaBytes(long value)
public abstract long toGigaBytes(long value)
Copyright © 2018 Hazelcast, Inc.. All rights reserved.