public static enum DataRateSpec.DataRateUnit extends java.lang.Enum<DataRateSpec.DataRateUnit>
Enum Constant and Description |
---|
BYTES_PER_SECOND |
KIBIBYTES_PER_SECOND |
MEBIBYTES_PER_SECOND |
Modifier and Type | Method and Description |
---|---|
double |
convert(double source,
DataRateSpec.DataRateUnit sourceUnit) |
static DataRateSpec.DataRateUnit |
fromSymbol(java.lang.String symbol) |
double |
toBytesPerSecond(double d) |
double |
toKibibytesPerSecond(double d) |
double |
toMebibytesPerSecond(double d) |
double |
toMegabitsPerSecond(double d) |
static DataRateSpec.DataRateUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataRateSpec.DataRateUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataRateSpec.DataRateUnit BYTES_PER_SECOND
public static final DataRateSpec.DataRateUnit KIBIBYTES_PER_SECOND
public static final DataRateSpec.DataRateUnit MEBIBYTES_PER_SECOND
public static DataRateSpec.DataRateUnit[] values()
for (DataRateSpec.DataRateUnit c : DataRateSpec.DataRateUnit.values()) System.out.println(c);
public static DataRateSpec.DataRateUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static DataRateSpec.DataRateUnit fromSymbol(java.lang.String symbol)
symbol
- the unit symbolpublic double toBytesPerSecond(double d)
public double toKibibytesPerSecond(double d)
public double toMebibytesPerSecond(double d)
public double toMegabitsPerSecond(double d)
public double convert(double source, DataRateSpec.DataRateUnit sourceUnit)
Copyright © 2009- The Apache Software Foundation