Enum SIPrefix

java.lang.Object
java.lang.Enum<SIPrefix>
com.globalmentor.si.SIPrefix
All Implemented Interfaces:
Named<String>, Serializable, Comparable<SIPrefix>

public enum SIPrefix extends Enum<SIPrefix> implements Named<String>
A prefix of the International System of Units codified by ISO 30. The prefixes appear in the order of smallest to largest factor.
Author:
Garret Wilson
See Also:
  • Enum Constant Details

    • YOCTO

      public static final SIPrefix YOCTO
      Prefix for septillionth.
    • ZEPTO

      public static final SIPrefix ZEPTO
      Prefix for sextillionth.
    • ATTO

      public static final SIPrefix ATTO
      Prefix for quintillionth.
    • FEMTO

      public static final SIPrefix FEMTO
      Prefix for quadrillionth.
    • PICO

      public static final SIPrefix PICO
      Prefix for trillionth.
    • NANO

      public static final SIPrefix NANO
      Prefix for billionth.
    • MICRO

      public static final SIPrefix MICRO
      Prefix for millionth.
    • MILLI

      public static final SIPrefix MILLI
      Prefix for thousandth.
    • CENTI

      public static final SIPrefix CENTI
      Prefix for hundredth.
    • DECI

      public static final SIPrefix DECI
      Prefix for tenth.
    • NONE

      public static final SIPrefix NONE
      No prefix.
    • DECA

      public static final SIPrefix DECA
      Prefix for ten.
    • HECTO

      public static final SIPrefix HECTO
      Prefix for hundred.
    • KILO

      public static final SIPrefix KILO
      Prefix for thousand.
    • MEGA

      public static final SIPrefix MEGA
      Prefix for million.
    • GIGA

      public static final SIPrefix GIGA
      Prefix for billion.
    • TERA

      public static final SIPrefix TERA
      Prefix for trillion.
    • PETA

      public static final SIPrefix PETA
      Prefix for quadrillion.
    • EXA

      public static final SIPrefix EXA
      Prefix for quintillion.
    • ZETTA

      public static final SIPrefix ZETTA
      Prefix for sextillion.
    • YOTTA

      public static final SIPrefix YOTTA
      Prefix for septillion.
  • Method Details

    • values

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

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

      public String getName()
      Specified by:
      getName in interface Named<String>
      Returns:
      The prefix name.
    • getSymbol

      public String getSymbol()
      Returns:
      The prefix symbol.
    • getFactorPower

      public int getFactorPower()
      Returns:
      The power of the prefix factor with 10 as the base.
    • getFactor

      public BigDecimal getFactor()
      Returns:
      The power of the prefix.
    • toString

      public String toString()
      Returns a string representation of the prefix. This version returns the prefix name.
      Overrides:
      toString in class Enum<SIPrefix>
      See Also: