public static enum MemorySize.MemoryUnit extends Enum<MemorySize.MemoryUnit>
To make larger values more compact, the common size suffixes are supported:
| 枚举常量和说明 |
|---|
BYTES |
GIGA_BYTES |
KILO_BYTES |
MEGA_BYTES |
TERA_BYTES |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getAllUnits() |
long |
getMultiplier() |
String[] |
getUnits() |
static boolean |
hasUnit(String text) |
static MemorySize.MemoryUnit |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static MemorySize.MemoryUnit[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
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 - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String[] getUnits()
public long getMultiplier()
public static String getAllUnits()
public static boolean hasUnit(String text)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.