Enum BinaryPrefix
- All Implemented Interfaces:
Serializable, Comparable<BinaryPrefix>, Prefix
This class provides support for common binary prefixes to be used by units.
- Since:
- 2.0
- Version:
- 1.3, April 20, 2018
- Author:
- Werner Keil
- See Also:
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> EXBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10246(binary prefix).intgetBase()Base part of the associated factor in base^exponent representation.intExponent part of the associated factor in base^exponent representation.Returns the symbol of this prefix.static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> GIBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10243(binary prefix).static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> KIBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor1024(binary prefix).static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> MEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10242(binary prefix).static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> PEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10245(binary prefix).static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> TEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10244(binary prefix).static BinaryPrefixReturns 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 javax.measure.Quantity<Q>>
javax.measure.Unit<Q> YOBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10248(binary prefix).static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q> ZEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10247(binary prefix).
-
Enum Constant Details
-
KIBI
-
MEBI
-
GIBI
-
TEBI
-
PEBI
-
EXBI
-
ZEBI
-
YOBI
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
KIBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> KIBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor1024(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1024).
-
MEBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> MEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10242(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1048576).
-
GIBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> GIBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10243(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1073741824).
-
TEBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> TEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10244(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1099511627776L).
-
PEBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> PEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10245(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1125899906842624L).
-
EXBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> EXBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10246(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1152921504606846976L).
-
ZEBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> ZEBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10247(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1152921504606846976d).
-
YOBI
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> YOBI(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor10248(binary prefix).- Parameters:
unit- any unit.- Returns:
unit.multiply(1208925819614629174706176d).
-
getSymbol
-
getBase
-
getExponent
Exponent part of the associated factor in base^exponent representation.- Specified by:
getExponentin interfacePrefix
-