Enum Class Area

java.lang.Object
java.lang.Enum<Area>
org.tquadrat.foundation.value.Area
All Implemented Interfaces:
Serializable, Comparable<Area>, Constable, Dimension, DimensionWithLinearConversion

@ClassVersion(sourceVersion="$Id: Area.java 1195 2026-04-15 21:33:40Z tquadrat $") @API(status=STABLE, since="0.1.0") public enum Area extends Enum<Area> implements DimensionWithLinearConversion
The various instances of area …
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: Area.java 1195 2026-04-15 21:33:40Z tquadrat $
Since:
0.1.0
UML Diagram
UML Diagram for "org.tquadrat.foundation.value.Area"

UML Diagram for "org.tquadrat.foundation.value.Area"

UML Diagram for "org.tquadrat.foundation.value.Area"
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • Area

      private Area(BigDecimal factor, String unitSymbol)
      Creates a new Area instance, with a default precision of zero mantissa digits.
      Parameters:
      factor - The factor.
      unitSymbol - The unit symbol String.
    • Area

      private Area(BigDecimal factor, String unitSymbol, int precision)
      Creates a new Area instance.
      Parameters:
      factor - The factor.
      unitSymbol - The unit symbol String.
      precision - The default precision.
  • Method Details

    • values

      public static Area[] 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 Area 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
    • baseUnit

      public final Area baseUnit()
      Specified by:
      baseUnit in interface Dimension
    • factor

      public final BigDecimal factor()
      Specified by:
      factor in interface DimensionWithLinearConversion
    • forUnit

      public static final Area forUnit(String unitSymbol) throws IllegalArgumentException
      Returns the Area instance for the given unit symbol.
      Parameters:
      unitSymbol - The unit symbol.
      Returns:
      The respective instance.
      Throws:
      IllegalArgumentException - The given unit is unknown.
    • getPrecision

      public final int getPrecision()
      Specified by:
      getPrecision in interface Dimension
    • unitSymbol

      public final String unitSymbol()
      Specified by:
      unitSymbol in interface Dimension