public enum DataUnit extends Enum<DataUnit>
Enum Constant and Description |
---|
B
Bytes
|
GB
Gigabytes
|
KB
Kilobytes
|
MB
Megabytes
|
TB
Terabytes
|
Modifier and Type | Field and Description |
---|---|
static Pattern |
DATA_SIZE_PATTERN |
static String |
DATA_SIZE_REGEX |
static double[] |
POWERS |
Modifier and Type | Method and Description |
---|---|
double |
convert(double sourceSize,
DataUnit sourceUnit) |
static Double |
parseDataSize(String value,
DataUnit units) |
double |
toB(double size) |
double |
toGB(double size) |
double |
toKB(double size) |
double |
toMB(double size) |
double |
toTB(double size) |
static DataUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DataUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataUnit B
public static final DataUnit KB
public static final DataUnit MB
public static final DataUnit GB
public static final DataUnit TB
public static final double[] POWERS
public static final String DATA_SIZE_REGEX
public static final Pattern DATA_SIZE_PATTERN
public static DataUnit[] values()
for (DataUnit c : DataUnit.values()) System.out.println(c);
public static DataUnit 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 double convert(double sourceSize, DataUnit sourceUnit)
public double toB(double size)
public double toKB(double size)
public double toMB(double size)
public double toGB(double size)
public double toTB(double size)
Copyright © 2024 Apache NiFi Project. All rights reserved.