Enum MeasureUnit

  • All Implemented Interfaces:
    Serializable, Comparable<MeasureUnit>, Key

    public enum MeasureUnit
    extends Enum<MeasureUnit>
    implements Key
    Enumerated the untis of measure to configure the number formatting.
    Possible values are core unit identifiers, defined here.
    Pairs of simple units can be concatenated with "-per-" to make a compound unit.
    There is no default value; if the style is "unit", the unit property must be provided.
    Author:
    Andrea "Stock" Stocchero
    • Enum Constant Detail

      • ACRE

        public static final MeasureUnit ACRE
        Core unit identifier for acre.
      • BIT

        public static final MeasureUnit BIT
        Core unit identifier for bit.
      • BYTE

        public static final MeasureUnit BYTE
        Core unit identifier for byte.
      • CELSIUS

        public static final MeasureUnit CELSIUS
        Core unit identifier for celsius.
      • CENTIMETER

        public static final MeasureUnit CENTIMETER
        Core unit identifier for centimeter.
      • DAY

        public static final MeasureUnit DAY
        Core unit identifier for day.
      • DEGREE

        public static final MeasureUnit DEGREE
        Core unit identifier for degree.
      • FAHRENHEIT

        public static final MeasureUnit FAHRENHEIT
        Core unit identifier for fahrenheit.
      • FLUID_OUNCE

        public static final MeasureUnit FLUID_OUNCE
        Core unit identifier for fluid-ounce.
      • FOOT

        public static final MeasureUnit FOOT
        Core unit identifier for foot.
      • GALLON

        public static final MeasureUnit GALLON
        Core unit identifier for gallon.
      • GIGABIT

        public static final MeasureUnit GIGABIT
        Core unit identifier for gigabit.
      • GIGABYTE

        public static final MeasureUnit GIGABYTE
        Core unit identifier for gigabyte.
      • GRAM

        public static final MeasureUnit GRAM
        Core unit identifier for gram.
      • HECTARE

        public static final MeasureUnit HECTARE
        Core unit identifier for hectare.
      • HOUR

        public static final MeasureUnit HOUR
        Core unit identifier for hour.
      • INCH

        public static final MeasureUnit INCH
        Core unit identifier for inch.
      • KILOBIT

        public static final MeasureUnit KILOBIT
        Core unit identifier for kilobit.
      • KILOBYTE

        public static final MeasureUnit KILOBYTE
        Core unit identifier for kilobyte.
      • KILOGRAM

        public static final MeasureUnit KILOGRAM
        Core unit identifier for kilogram.
      • KILOMETER

        public static final MeasureUnit KILOMETER
        Core unit identifier for kilometer.
      • LITER

        public static final MeasureUnit LITER
        Core unit identifier for liter.
      • MEGABIT

        public static final MeasureUnit MEGABIT
        Core unit identifier for megabit.
      • MEGABYTE

        public static final MeasureUnit MEGABYTE
        Core unit identifier for megabyte.
      • METER

        public static final MeasureUnit METER
        Core unit identifier for meter.
      • MILE

        public static final MeasureUnit MILE
        Core unit identifier for mile.
      • MILE_SCANDINAVIAN

        public static final MeasureUnit MILE_SCANDINAVIAN
        Core unit identifier for mile-scandinavian.
      • MILLILITER

        public static final MeasureUnit MILLILITER
        Core unit identifier for milliliter.
      • MILLIMETER

        public static final MeasureUnit MILLIMETER
        Core unit identifier for millimeter.
      • MILLISECOND

        public static final MeasureUnit MILLISECOND
        Core unit identifier for millisecond.
      • MINUTE

        public static final MeasureUnit MINUTE
        Core unit identifier for minute.
      • MONTH

        public static final MeasureUnit MONTH
        Core unit identifier for month.
      • OUNCE

        public static final MeasureUnit OUNCE
        Core unit identifier for ounce.
      • PERCENT

        public static final MeasureUnit PERCENT
        Core unit identifier for percent.
      • PETABYTE

        public static final MeasureUnit PETABYTE
        Core unit identifier for petabyte.
      • POUND

        public static final MeasureUnit POUND
        Core unit identifier for pound.
      • SECOND

        public static final MeasureUnit SECOND
        Core unit identifier for second.
      • STONE

        public static final MeasureUnit STONE
        Core unit identifier for stone.
      • TERABIT

        public static final MeasureUnit TERABIT
        Core unit identifier for terabit.
      • TERABYTE

        public static final MeasureUnit TERABYTE
        Core unit identifier for terabyte.
      • WEEK

        public static final MeasureUnit WEEK
        Core unit identifier for week.
      • YARD

        public static final MeasureUnit YARD
        Core unit identifier for yard.
      • YEAR

        public static final MeasureUnit YEAR
        Core unit identifier for year.
    • Method Detail

      • values

        public static MeasureUnit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MeasureUnit c : MeasureUnit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MeasureUnit 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
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property