Class Area.Unit

All Implemented Interfaces:
UnitInterface<Area.Unit,Area>
Enclosing class:
Area

public static class Area.Unit extends AbstractUnit<Area.Unit,Area>
Area.Unit encodes the area unit (length x length).

Copyright (c) 2025-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.

Author:
Alexander Verbraeck
  • Field Details

    • SI_UNIT

      public static final SIUnit SI_UNIT
      The dimensions of Area: m2.
    • m2

      public static final Area.Unit m2
      Square meter.
    • SI

      public static final Area.Unit SI
      The SI or BASE unit.
    • km2

      public static final Area.Unit km2
      Square kilometer.
    • hm2

      public static final Area.Unit hm2
      Square hectometer.
    • dam2

      public static final Area.Unit dam2
      Square decameter.
    • dm2

      public static final Area.Unit dm2
      Square decimeter.
    • cm2

      public static final Area.Unit cm2
      Square centimeter.
    • mm2

      public static final Area.Unit mm2
      Square millimeter.
    • mum2

      public static final Area.Unit mum2
      Square micrometer.
    • nm2

      public static final Area.Unit nm2
      Square nanometer.
    • pm2

      public static final Area.Unit pm2
      Square picometer.
    • fm2

      public static final Area.Unit fm2
      Square femtometer.
    • am2

      public static final Area.Unit am2
      Square attometer.
    • ca

      public static final Area.Unit ca
      centiare.
    • a

      public static final Area.Unit a
      are.
    • ha

      public static final Area.Unit ha
      hectare.
    • mi2

      public static final Area.Unit mi2
      mile2.
    • NM2

      public static final Area.Unit NM2
      Nautical mile2.
    • ft2

      public static final Area.Unit ft2
      ft2.
    • in2

      public static final Area.Unit in2
      in2.
    • yd2

      public static final Area.Unit yd2
      yd2.
    • ac

      public static final Area.Unit ac
      acre (international) defined as 1/640 square mile or 4840 square yards.
  • Constructor Details

    • Unit

      public Unit(String id, String name, double scaleFactorToBaseUnit, UnitSystem unitSystem)
      Create a new Area unit.
      Parameters:
      id - the id or main abbreviation of the unit
      name - the full name of the unit
      scaleFactorToBaseUnit - the scale factor of the unit to convert it TO the base (SI) unit
      unitSystem - the unit system such as SI or IMPERIAL
    • Unit

      public Unit(String textualAbbreviation, String displayAbbreviation, String name, Scale scale, UnitSystem unitSystem)
      Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
      Parameters:
      textualAbbreviation - the textual abbreviation of the unit, which doubles as the id
      displayAbbreviation - the display abbreviation of the unit
      name - the full name of the unit
      scale - the scale to use to convert between this unit and the standard (e.g., SI, BASE) unit
      unitSystem - unit system, e.g. SI or Imperial
  • Method Details

    • siUnit

      public SIUnit siUnit()
      Description copied from interface: UnitInterface
      Return the SI unit for this unit.
      Returns:
      the SI unit for this unit
    • getBaseUnit

      public Area.Unit getBaseUnit()
      Description copied from interface: UnitInterface
      Return the base unit for this unit.
      Returns:
      the base unit for this unit
    • ofSi

      public Area ofSi(double si)
      Description copied from interface: UnitInterface
      Return an SI-quantity for this unit with a value.
      Parameters:
      si - the value in SI or BASE units
      Returns:
      an SI-quantity for this unit with the given si-value
    • deriveUnit

      public Area.Unit deriveUnit(String textualAbbreviation, String displayAbbreviation, String name, double scaleFactor, UnitSystem unitSystem)
      Description copied from class: AbstractUnit
      Return a linearly scaled derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
      Specified by:
      deriveUnit in class AbstractUnit<Area.Unit,Area>
      Parameters:
      textualAbbreviation - the textual abbreviation of the unit, which doubles as the id
      displayAbbreviation - the display abbreviation of the unit
      name - the full name of the unit
      scaleFactor - the (linear) scale factor to multiply with the current (linear) scale factor
      unitSystem - unit system, e.g. SI or Imperial
      Returns:
      a derived unit for this unit