Enum MeasureUnit.Complexity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MeasureUnit.Complexity>
    Enclosing class:
    MeasureUnit

    public static enum MeasureUnit.Complexity
    extends java.lang.Enum<MeasureUnit.Complexity>
    Enumeration for unit complexity. There are three levels:
    • SINGLE: A single unit, optionally with a power and/or SI or binary prefix. Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.
    • COMPOUND: A unit composed of the product of multiple single units. Examples: meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
    • MIXED: A unit composed of the sum of multiple single units. Examples: foot-and-inch, hour-and-minute-and-second, degree-and-arcminute-and-arcsecond.
    The complexity determines which operations are available. For example, you cannot set the power or prefix of a compound unit.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COMPOUND
      A compound unit, like meter-per-second.
      MIXED
      A mixed unit, like hour-and-minute.
      SINGLE
      A single unit, like kilojoule.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MeasureUnit.Complexity valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MeasureUnit.Complexity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static MeasureUnit.Complexity[] 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.Complexity c : MeasureUnit.Complexity.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.Complexity valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null