public enum BinaryPrefix extends java.lang.Enum<BinaryPrefix> implements Prefix
This class provides support for common binary prefixes to be used by units.
Enum Constant and Description |
---|
EXBI |
GIBI |
KIBI |
MEBI |
PEBI |
TEBI |
YOBI |
ZEBI |
Modifier and Type | Method and Description |
---|---|
static <Q extends Quantity<Q>> |
EXBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10246 (binary prefix). |
int |
getBase()
Base part of the associated factor in base^exponent representation.
|
int |
getExponent()
Exponent part of the associated factor in base^exponent representation.
|
java.lang.String |
getName()
Returns the name of this prefix.
|
java.lang.String |
getSymbol()
Returns the symbol of this prefix.
|
static <Q extends Quantity<Q>> |
GIBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10243 (binary prefix). |
static <Q extends Quantity<Q>> |
KIBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
1024 (binary prefix). |
static <Q extends Quantity<Q>> |
MEBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10242 (binary prefix). |
static <Q extends Quantity<Q>> |
PEBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10245 (binary prefix). |
static <Q extends Quantity<Q>> |
TEBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10244 (binary prefix). |
static BinaryPrefix |
valueOf(java.lang.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.
|
static <Q extends Quantity<Q>> |
YOBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10248 (binary prefix). |
static <Q extends Quantity<Q>> |
ZEBI(Unit<Q> unit)
Returns the specified unit multiplied by the factor
10247 (binary prefix). |
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
public static BinaryPrefix[] values()
for (BinaryPrefix c : BinaryPrefix.values()) System.out.println(c);
public static BinaryPrefix 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 <Q extends Quantity<Q>> Unit<Q> KIBI(Unit<Q> unit)
1024
(binary prefix).unit
- any unit.unit.multiply(1024)
.public static <Q extends Quantity<Q>> Unit<Q> MEBI(Unit<Q> unit)
10242
(binary prefix).unit
- any unit.unit.multiply(1048576)
.public static <Q extends Quantity<Q>> Unit<Q> GIBI(Unit<Q> unit)
10243
(binary prefix).unit
- any unit.unit.multiply(1073741824)
.public static <Q extends Quantity<Q>> Unit<Q> TEBI(Unit<Q> unit)
10244
(binary prefix).unit
- any unit.unit.multiply(1099511627776L)
.public static <Q extends Quantity<Q>> Unit<Q> PEBI(Unit<Q> unit)
10245
(binary prefix).unit
- any unit.unit.multiply(1125899906842624L)
.public static <Q extends Quantity<Q>> Unit<Q> EXBI(Unit<Q> unit)
10246
(binary prefix).unit
- any unit.unit.multiply(1152921504606846976L)
.public static <Q extends Quantity<Q>> Unit<Q> ZEBI(Unit<Q> unit)
10247
(binary prefix).unit
- any unit.unit.multiply(1152921504606846976d)
.public static <Q extends Quantity<Q>> Unit<Q> YOBI(Unit<Q> unit)
10248
(binary prefix).unit
- any unit.unit.multiply(1208925819614629174706176d)
.public java.lang.String getSymbol()
public int getBase()
public int getExponent()
getExponent
in interface Prefix
Copyright © 2014–2018 Jean-Marie Dautelle, Werner Keil, Otavio Santana. All rights reserved.