public static enum MemorySize.MemoryUnit extends Enum<MemorySize.MemoryUnit>
To make larger values more compact, the common size suffixes are supported:
Enum Constant and Description |
---|
BYTES |
GIGA_BYTES |
KILO_BYTES |
MEGA_BYTES |
TERA_BYTES |
Modifier and Type | Method and Description |
---|---|
static String |
getAllUnits() |
long |
getMultiplier() |
String[] |
getUnits() |
static boolean |
hasUnit(String text) |
static MemorySize.MemoryUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MemorySize.MemoryUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MemorySize.MemoryUnit BYTES
public static final MemorySize.MemoryUnit KILO_BYTES
public static final MemorySize.MemoryUnit MEGA_BYTES
public static final MemorySize.MemoryUnit GIGA_BYTES
public static final MemorySize.MemoryUnit TERA_BYTES
public static MemorySize.MemoryUnit[] values()
for (MemorySize.MemoryUnit c : MemorySize.MemoryUnit.values()) System.out.println(c);
public static MemorySize.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 String[] getUnits()
public long getMultiplier()
public static String getAllUnits()
public static boolean hasUnit(String text)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.