private static enum FileSize.Units extends Enum<FileSize.Units>
Enum Constant and Description |
---|
B
Byte, standard unit.
|
GB
Gigabytes, 2^30 = 1073741824 Bytes.
|
KB
Kilobytes, 2^10 = 1024 Bytes.
|
MB
Megabytes, 2^20 = 1048576 Bytes.
|
TB
Terabytes, 2^40 = 1099511627776 Bytes.
|
Modifier and Type | Field and Description |
---|---|
private static Map<String,FileSize.Units> |
UNITS |
(package private) long |
value
Units value.
|
Modifier and Type | Method and Description |
---|---|
static FileSize.Units |
forName(String name) |
static FileSize.Units |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FileSize.Units[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileSize.Units B
public static final FileSize.Units KB
public static final FileSize.Units MB
public static final FileSize.Units GB
public static final FileSize.Units TB
long value
private static Map<String,FileSize.Units> UNITS
public static FileSize.Units[] values()
for (FileSize.Units c : FileSize.Units.values()) System.out.println(c);
public static FileSize.Units 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 static FileSize.Units forName(String name)
Copyright © 2018. All rights reserved.