Package org.openhab.core.library.unit
Enum Class BinaryPrefix
- All Implemented Interfaces:
Serializable
,Comparable<BinaryPrefix>
,Constable
,tech.uom.lib.common.function.SymbolSupplier
,tech.uom.lib.common.function.UnitConverterSupplier
@NonNullByDefault
public enum BinaryPrefix
extends Enum<BinaryPrefix>
implements tech.uom.lib.common.function.SymbolSupplier, tech.uom.lib.common.function.UnitConverterSupplier
The binary prefixes used to derive units by specific powers of 2.
- Author:
- Gaƫl L'hopital - Initial contribution
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
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 factor260
javax.measure.UnitConverter
Returns the corresponding unit converter.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 factor230
static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q>KIBI
(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor210
static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q>MEBI
(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor220
static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q>PEBI
(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor250
static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q>TEBI
(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor240
static BinaryPrefix
Returns the enum constant of this class with the specified name.static BinaryPrefix[]
values()
Returns an array containing the constants of this enum class, 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 factor280
static <Q extends javax.measure.Quantity<Q>>
javax.measure.Unit<Q>ZEBI
(javax.measure.Unit<Q> unit) Returns the specified unit multiplied by the factor270
-
Enum Constant Details
-
YOBI
-
ZEBI
-
EXBI
-
PEBI
-
TEBI
-
GIBI
-
MEBI
-
KIBI
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getSymbol
Returns the symbol of this prefix.- Specified by:
getSymbol
in interfacetech.uom.lib.common.function.SymbolSupplier
- Returns:
- this prefix symbol, not
null
.
-
getConverter
public javax.measure.UnitConverter getConverter()Returns the corresponding unit converter.- Specified by:
getConverter
in interfacetech.uom.lib.common.function.UnitConverterSupplier
- Returns:
- the unit converter.
-
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 factor280
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e80)
.
-
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 factor270
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e70)
.
-
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 factor260
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e60)
.
-
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 factor250
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e50)
.
-
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 factor240
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e40)
.
-
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 factor230
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e30)
.
-
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 factor220
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e20)
.
-
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 factor210
- Type Parameters:
Q
- The type of the quantity measured by the unit.- Parameters:
unit
- any unit.- Returns:
unit.times(2e10)
.
-