Enum Class BinaryPrefix

java.lang.Object
java.lang.Enum<BinaryPrefix>
org.openhab.core.library.unit.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

    Enum Constants
    Enum Constant
    Description
     
     
     
     
     
     
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    EXBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 260
    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 factor 230
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    KIBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 210
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    MEBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 220
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    PEBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 250
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    TEBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 240
    Returns the enum constant of this class with the specified name.
    static BinaryPrefix[]
    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 factor 280
    static <Q extends javax.measure.Quantity<Q>>
    javax.measure.Unit<Q>
    ZEBI(javax.measure.Unit<Q> unit)
    Returns the specified unit multiplied by the factor 270

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static BinaryPrefix[] 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

      public static BinaryPrefix valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getSymbol

      public String getSymbol()
      Returns the symbol of this prefix.
      Specified by:
      getSymbol in interface tech.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 interface tech.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 factor 280
      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 factor 270
      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 factor 260
      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 factor 250
      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 factor 240
      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 factor 230
      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 factor 220
      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 factor 210
      Type Parameters:
      Q - The type of the quantity measured by the unit.
      Parameters:
      unit - any unit.
      Returns:
      unit.times(2e10).