public enum MemoryUnit extends Enum<MemoryUnit>
Modifier and Type | Method and Description |
---|---|
static MemoryUnit |
fromSuffix(String suffix) |
String |
suffix() |
long |
toBytes(long 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 BYTE
public static final MemoryUnit KILOBYTE
public static final MemoryUnit MEGABYTE
public static final MemoryUnit GIGABYTE
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 toBytes(long memory)
public String suffix()
public static MemoryUnit fromSuffix(String suffix)
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.