public enum BinaryPrefix extends Enum<BinaryPrefix> implements IPrefix<BinaryPrefix>
TimeUnit
.Enum Constant and Description |
---|
EXBI |
GIBI |
KIBI |
MEBI |
NOBI |
PEBI |
TEBI |
YOBI |
ZEBI |
Modifier and Type | Field and Description |
---|---|
String |
englishName |
String |
localizedName |
DecimalPrefix |
prefixSI
Deprecated.
Accept that kilobytes and kibibytes are different units.
|
String |
symbolIEC |
String |
symbolJEDEC |
String |
symbolSI |
Modifier and Type | Method and Description |
---|---|
String |
altSymbol()
An alternative symbol.
|
StringBuilder |
asExponentialStringBuilder(boolean multiplicationSign) |
double |
convertTo(double value) |
float |
convertTo(float value) |
long |
convertTo(long value) |
LinearKindOfQuantity.LinearUnitSelector |
createUnitSelector(LinearKindOfQuantity kindOfQuantity,
Iterable<BinaryPrefix> prefixes) |
static int |
getAlignmentLog1024(double value)
The base 1024 logarithm of the binary alignment of
value . |
static int |
getAlignmentLog1024(long value)
The base 1024 logarithm of the binary alignment of
value . |
static int |
getAlignmentLog2(double value)
The base 2 logarithm of the binary alignment of
value . |
static int |
getAlignmentLog2(long value)
The base 2 logarithm of the binary alignment of
value . |
static int |
getFloorLog1024(double value)
The base 1024 logarithm.
|
static int |
getFloorLog1024(long value)
The base 1024 logarithm.
|
static int |
getFloorLog2(double value)
The base 2 logarithm.
|
static int |
getFloorLog2(long value)
The base 2 logarithm.
|
static BinaryPrefix |
getFloorPrefix(double value) |
static BinaryPrefix |
getFloorPrefix(long value) |
String |
identifier() |
String |
localizedName() |
int |
log1024() |
BinaryScaleFactor |
scaleFactor() |
int |
shift() |
String |
symbol() |
BinaryScaleFactor |
valueFactorTo(BinaryPrefix targetPrefix) |
static BinaryPrefix |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BinaryPrefix[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BinaryPrefix NOBI
public static final BinaryPrefix KIBI
public static final BinaryPrefix MEBI
public static final BinaryPrefix GIBI
public static final BinaryPrefix TEBI
public static final BinaryPrefix PEBI
public static final BinaryPrefix EXBI
public static final BinaryPrefix ZEBI
public static final BinaryPrefix YOBI
@Deprecated public final DecimalPrefix prefixSI
public final String symbolSI
public final String symbolJEDEC
public final String symbolIEC
public final String englishName
public final String localizedName
public static BinaryPrefix[] values()
for (BinaryPrefix c : BinaryPrefix.values()) System.out.println(c);
public static BinaryPrefix 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 int shift()
public int log1024()
public long convertTo(long value)
public float convertTo(float value)
public double convertTo(double value)
public static int getFloorLog2(long value)
Math.floor(double)
.value
public static int getFloorLog1024(long value)
Math.floor(double)
.value
public static BinaryPrefix getFloorPrefix(long value)
public static int getAlignmentLog2(long value)
value
. Note that for the value 0, the
return value is undefined.value
public static int getAlignmentLog1024(long value)
value
. Note that for the value 0,
the return value is undefined.value
public static int getFloorLog2(double value)
Math.floor(double)
.value
public static int getFloorLog1024(double value)
Math.floor(double)
.value
public static BinaryPrefix getFloorPrefix(double value)
public static int getAlignmentLog2(double value)
value
. Note that for zero, infinity,
NaN, and denormalized values, the return value is currently undefined.value
public static int getAlignmentLog1024(double value)
value
. Note that for zero,
infinity, NaN, and denormalized values, the return value is currently undefined.value
public String identifier()
identifier
in interface IPrefix<BinaryPrefix>
public String symbol()
symbol
in interface IPrefix<BinaryPrefix>
public String altSymbol()
IPrefix
altSymbol
in interface IPrefix<BinaryPrefix>
null
if no other representation is availablepublic String localizedName()
localizedName
in interface IPrefix<BinaryPrefix>
public StringBuilder asExponentialStringBuilder(boolean multiplicationSign)
asExponentialStringBuilder
in interface IPrefix<BinaryPrefix>
public BinaryScaleFactor scaleFactor()
scaleFactor
in interface IPrefix<BinaryPrefix>
public BinaryScaleFactor valueFactorTo(BinaryPrefix targetPrefix)
valueFactorTo
in interface IPrefix<BinaryPrefix>
public LinearKindOfQuantity.LinearUnitSelector createUnitSelector(LinearKindOfQuantity kindOfQuantity, Iterable<BinaryPrefix> prefixes)
createUnitSelector
in interface IPrefix<BinaryPrefix>
Copyright © 2020. All rights reserved.