Enum Class BitData.Unit

java.lang.Object
java.lang.Enum<BitData.Unit>
com.marcpg.libpg.data.storage.BitData.Unit
All Implemented Interfaces:
Serializable, Comparable<BitData.Unit>, Constable
Enclosing class:
BitData

public static enum BitData.Unit extends Enum<BitData.Unit>
A data unit in the Bit Format, such as megabit or gigabit
Since:
0.0.1
  • Enum Constant Details

    • BIT

      public static final BitData.Unit BIT
      One bit - on or off
    • KILOBIT

      public static final BitData.Unit KILOBIT
      One kilobit - 1000 bit
    • MEGABIT

      public static final BitData.Unit MEGABIT
      One megabit - 1000 kilobit
    • GIGABIT

      public static final BitData.Unit GIGABIT
      One gigabit - 1000 megabit
    • TERABIT

      public static final BitData.Unit TERABIT
      One terabit - 1000 gigabit
    • PETABIT

      public static final BitData.Unit PETABIT
      One petabit - 1000 terabit
    • EXABIT

      public static final BitData.Unit EXABIT
      One exabit - 1000 petabit
    • KIBIBYTE

      public static final BitData.Unit KIBIBYTE
      One kibibit - 1024 bit
    • MEBIBYTE

      public static final BitData.Unit MEBIBYTE
      One mebibit - 1024 kibibit
    • GIBIBYTE

      public static final BitData.Unit GIBIBYTE
      One gibibit - 1024 mebibit
    • TEBIBYTE

      public static final BitData.Unit TEBIBYTE
      One tebibit - 1024 gibibit
    • PEBIBYTE

      public static final BitData.Unit PEBIBYTE
      One pebibit - 1024 tebibit
    • EXBIBYTE

      public static final BitData.Unit EXBIBYTE
      One exbibit - 1024 pebibit
  • Field Details

    • bits

      public final long bits
      The number of bits in one unit.
    • abb

      public final String abb
      The unit's abbreviation.
    • format

      public final BitData.Unit.Format format
      The unit's format
  • Method Details

    • values

      public static BitData.Unit[] 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 BitData.Unit 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
    • eng

      @NotNull public @NotNull String eng()
      The full english name of the unit as listed in the english dictionary.
      Same as pluralEng().
      Returns:
      The english name.
    • pluralEng

      @NotNull public @NotNull String pluralEng()
      Same as eng(), because the plural of bit is just bit.
      Returns:
      The english name.
    • toString

      @NotNull public @NotNull String toString()
      Just the same as eng() and pluralEng().
      Overrides:
      toString in class Enum<BitData.Unit>