Enum Class SIPrefixes

java.lang.Object
java.lang.Enum<SIPrefixes>
de.powerstat.validation.values.SIPrefixes
All Implemented Interfaces:
IValueObject, Serializable, Comparable<SIPrefixes>, Constable

public enum SIPrefixes extends Enum<SIPrefixes> implements IValueObject
SI prefixes. https://en.wikipedia.org/wiki/Metric_prefix
  • Enum Constant Details

    • QUECTO

      public static final SIPrefixes QUECTO
      Quecto.
    • RONTO

      public static final SIPrefixes RONTO
      Ronto.
    • YOCTO

      public static final SIPrefixes YOCTO
      Yocto.
    • ZEPTO

      public static final SIPrefixes ZEPTO
      Zepto.
    • ATTO

      public static final SIPrefixes ATTO
      Atto.
    • FEMTO

      public static final SIPrefixes FEMTO
      Femto.
    • PICO

      public static final SIPrefixes PICO
      Pico.
    • NANO

      public static final SIPrefixes NANO
      Nano.
    • MICRO

      public static final SIPrefixes MICRO
      Micro.
    • MILLI

      public static final SIPrefixes MILLI
      Milli.
    • CENTI

      public static final SIPrefixes CENTI
      Centi.
    • DECI

      public static final SIPrefixes DECI
      Deci.
    • ZERO

      public static final SIPrefixes ZERO
      Zero.
    • DECA

      public static final SIPrefixes DECA
      Deca.
    • HECTO

      public static final SIPrefixes HECTO
      Hecto.
    • KILO

      public static final SIPrefixes KILO
      Kilo.
    • MEGA

      public static final SIPrefixes MEGA
      Mega.
    • GIGA

      public static final SIPrefixes GIGA
      Giga.
    • TERA

      public static final SIPrefixes TERA
      Tera.
    • PETA

      public static final SIPrefixes PETA
      Peta.
    • EXA

      public static final SIPrefixes EXA
      Exa.
    • ZETTA

      public static final SIPrefixes ZETTA
      Zetta.
    • YOTTA

      public static final SIPrefixes YOTTA
      Yotta.
    • RONNA

      public static final SIPrefixes RONNA
      Ronna.
    • QUETTA

      public static final SIPrefixes QUETTA
      Quetta.
  • Field Details

    • ORDERED_ENUM_CONSTANTS

      private static final NavigableSet<SIPrefixes> ORDERED_ENUM_CONSTANTS
      Ordered enum constants.
    • base

      private final int base
      Base 10 number.
    • symbol

      private final String symbol
      Symbol.
  • Constructor Details

    • SIPrefixes

      private SIPrefixes(int base, String symbol)
      Constructor.
      Parameters:
      base - Base 10 number
      symbol - Symbol
  • Method Details

    • values

      public static SIPrefixes[] 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 SIPrefixes 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
    • first

      public static SIPrefixes first()
      Get first (lowest) prefix.
      Returns:
      first (lowest) prefix
    • last

      public static SIPrefixes last()
      Get last (highest) prefix.
      Returns:
      last (highest) prefix
    • base

      public static SIPrefixes base()
      Get base (0) prefix.
      Returns:
      Base (0) prefix
    • byBase

      public static SIPrefixes byBase(int base)
      Get SIPrefixes by base.
      Parameters:
      base - Base 10
      Returns:
      SIPrefixes
      Throws:
      NoSuchElementException - If there is no prefix with the given base
    • getBase

      public int getBase()
      Get base number.
      Returns:
      Base number
    • hasNext

      public boolean hasNext()
      Has next.
      Returns:
      true: if there is a higher value; false otherwise
    • hasPrevious

      public boolean hasPrevious()
      Has previous.
      Returns:
      true: if there is a lower value; false otherwise
    • next

      public SIPrefixes next()
      Get next prefix.
      Returns:
      Next higher prefix
      Throws:
      NoSuchElementException - If there is no higher prefix
    • previous

      public SIPrefixes previous()
      Get previous prefix.
      Returns:
      Previous lower prefix
      Throws:
      NoSuchElementException - If there is no lower prefix
    • getName

      public String getName()
      Get prefix name.
      Returns:
      Prefix name
    • getSymbol

      public String getSymbol()
      Get prefix symbol.
      Returns:
      Prefix symbol
    • stringValue

      public String stringValue()
      Returns the value of this SIPrefixes as a string.
      Specified by:
      stringValue in interface IValueObject
      Returns:
      The text value represented by this object after conversion to type string.