de.caff.util.measure

## Class SIPrefix

- java.lang.Object
- - de.caff.util.measure.SIPrefix

-     public final class SIPrefix
      extends java.lang.Object

  The SI (Système International) unit prefixes.
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SIPrefix` | `ATTO` The atto prefix (10^-18).
    `static SIPrefix` | `CENTI` The centi prefix (10^-2).
    `static SIPrefix` | `DECA` The deca prefix (10^1).
    `static SIPrefix` | `DECI` The dezi prefix (10^-1).
    `static SIPrefix` | `EXA` The exa prefix (10^18).
    `static SIPrefix` | `EXBI` The exbi predix (2^50).
    `static SIPrefix` | `FEMTO` The femto prefix (10^-15).
    `static SIPrefix` | `GIBI` The gibi predix (2^30).
    `static SIPrefix` | `GIGA` The giga prefix (10^9).
    `static SIPrefix` | `HECTO` The hecto prefix (10^2).
    `(package private) static java.lang.String` | `I18N_PREFIX` The prefix for I18n resolution of names.
    `static SIPrefix` | `KIBI` The kibi prefix (2^10).
    `static SIPrefix` | `KILO` The kilo prefix (10^3).
    `static SIPrefix` | `MEBI` The mebi predix (2^20).
    `static SIPrefix` | `MEGA` The mega prefix (10^6).
    `static SIPrefix` | `MICRO` The micro prefix (10^-6).
    `static SIPrefix` | `MILLI` The milli prefix (10^-3).
    `static SIPrefix` | `NANO` The nano prefix (10^-9).
    `static SIPrefix` | `NO_PREFIX` No prefix (10^0).
    `static SIPrefix` | `PEBI` The pebi predix (2^50).
    `static SIPrefix` | `PETA` The peta prefix (10^15).
    `static SIPrefix` | `PICO` The pico prefix (10^-12).
    `static SIPrefix` | `QUECTO` The quecto prefix (10^-27).
    `static SIPrefix` | `QUETTA` The quetta prefix (10^30).
    `static SIPrefix` | `RONNA` The ronna prefix (10^27).
    `static SIPrefix` | `RONTO` The ronto prefix (10^-27).
    `static SIPrefix` | `TEBI` The tebi predix (2^40).
    `static SIPrefix` | `TERA` The tera prefix (10^12).
    `static SIPrefix` | `YOBI` The yobi predix (2^70).
    `static SIPrefix` | `YOCTO` The yocto prefix (10^-24).
    `static SIPrefix` | `YOTTA` The yotta prefix (10^24).
    `static SIPrefix` | `ZEBI` The zebi predix (2^60).
    `static SIPrefix` | `ZEPTO` The zepto prefix (10^-21).
    `static SIPrefix` | `ZETTA` The zetta prefix (10^21).

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static OrderedPair<SIPrefix,java.lang.String>` | `extractPrefix(java.lang.String unit)` Get the prefix indicated by a unit.
    `double` | `getFactor()` Get the factor implied by this prefix.
    `java.lang.String` | `getName()` Get the name.
    `java.lang.String` | `getPrefix()` Get the prefix.
    `static SIPrefix` | `getPrefix(java.lang.String unit)` Get the prefix indicated by a unit.
    `java.lang.String` | `toString()` Returns a string representation of the object

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### I18N_PREFIX

          static final java.lang.String I18N_PREFIX

      The prefix for I18n resolution of names.
      See Also:
        Constant Field Values

    - #### DECI

          public static final SIPrefix DECI

      The dezi prefix (10^-1).

    - #### CENTI

          public static final SIPrefix CENTI

      The centi prefix (10^-2).

    - #### MILLI

          public static final SIPrefix MILLI

      The milli prefix (10^-3).

    - #### MICRO

          public static final SIPrefix MICRO

      The micro prefix (10^-6).

    - #### NANO

          public static final SIPrefix NANO

      The nano prefix (10^-9).

    - #### PICO

          public static final SIPrefix PICO

      The pico prefix (10^-12).

    - #### FEMTO

          public static final SIPrefix FEMTO

      The femto prefix (10^-15).

    - #### ATTO

          public static final SIPrefix ATTO

      The atto prefix (10^-18).

    - #### ZEPTO

          public static final SIPrefix ZEPTO

      The zepto prefix (10^-21).

    - #### YOCTO

          public static final SIPrefix YOCTO

      The yocto prefix (10^-24).

    - #### RONTO

          public static final SIPrefix RONTO

      The ronto prefix (10^-27).

    - #### QUECTO

          public static final SIPrefix QUECTO

      The quecto prefix (10^-27).

    - #### NO_PREFIX

          public static final SIPrefix NO_PREFIX

      No prefix (10^0).

    - #### DECA

          public static final SIPrefix DECA

      The deca prefix (10^1).

    - #### HECTO

          public static final SIPrefix HECTO

      The hecto prefix (10^2).

    - #### KILO

          public static final SIPrefix KILO

      The kilo prefix (10^3).

    - #### MEGA

          public static final SIPrefix MEGA

      The mega prefix (10^6).

    - #### GIGA

          public static final SIPrefix GIGA

      The giga prefix (10^9).

    - #### TERA

          public static final SIPrefix TERA

      The tera prefix (10^12).

    - #### PETA

          public static final SIPrefix PETA

      The peta prefix (10^15).

    - #### EXA

          public static final SIPrefix EXA

      The exa prefix (10^18).

    - #### ZETTA

          public static final SIPrefix ZETTA

      The zetta prefix (10^21).

    - #### YOTTA

          public static final SIPrefix YOTTA

      The yotta prefix (10^24).

    - #### RONNA

          public static final SIPrefix RONNA

      The ronna prefix (10^27).

    - #### QUETTA

          public static final SIPrefix QUETTA

      The quetta prefix (10^30).

    - #### KIBI

          public static final SIPrefix KIBI

      The kibi prefix (2^10).

    - #### MEBI

          public static final SIPrefix MEBI

      The mebi predix (2^20).

    - #### GIBI

          public static final SIPrefix GIBI

      The gibi predix (2^30).

    - #### TEBI

          public static final SIPrefix TEBI

      The tebi predix (2^40).

    - #### PEBI

          public static final SIPrefix PEBI

      The pebi predix (2^50).

    - #### EXBI

          public static final SIPrefix EXBI

      The exbi predix (2^50).

    - #### ZEBI

          public static final SIPrefix ZEBI

      The zebi predix (2^60).

    - #### YOBI

          public static final SIPrefix YOBI

      The yobi predix (2^70).

  - ### Method Detail

    - #### getFactor

          public double getFactor()

      Get the factor implied by this prefix.
      Returns:
        factor

    - #### getPrefix

          @NotNull
          public java.lang.String getPrefix()

      Get the prefix.
      Returns:
        the prefix

    - #### getName

          @NotNull
          public java.lang.String getName()

      Get the name.
      Returns:
        name

    - #### getPrefix

          @Nullable
          public static SIPrefix getPrefix(@Nullable
                                                     java.lang.String unit)

      Get the prefix indicated by a unit.
      Parameters:
        `unit` - unit with potential prefix
      Returns:
        prefix or `null` if unit doesn't have a prefix

    - #### extractPrefix

          @Nullable
          public static OrderedPair<SIPrefix,java.lang.String> extractPrefix(@Nullable
                                                                                       java.lang.String unit)

      Get the prefix indicated by a unit.
      Parameters:
        `unit` - unit with potential prefix
      Returns:
        ordered pair of SI prefix (`OrderedPair.first`) and remaining string (`OrderedPair.second`) if the given unit has a prefix, or `null` if unit doesn't have a SI prefix

    - #### toString

          public java.lang.String toString()

      Returns a string representation of the object. *
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string representation of the object.