Class TLcdAngleUnit

java.lang.Object
com.luciad.util.TLcdAngleUnit
All Implemented Interfaces:
ILcdISO19103UnitOfMeasure, Serializable

public class TLcdAngleUnit extends Object implements Serializable, ILcdISO19103UnitOfMeasure
This class defines angle unit constants. The standard unit is 'radians'.
See Also:
  • Field Details

  • Constructor Details

    • TLcdAngleUnit

      public TLcdAngleUnit(String aUnitName, String aUnitShortName, double aToRadianFactor)
      Constructs a new angle unit.
      Parameters:
      aUnitName - The name of the unit.
      aUnitShortName - The short name of the unit, typically used as the suffix after a number.
      aToRadianFactor - The factor to convert a value expressed in this unit to radians. For example, if the unit is degrees, the factor is 2*Math.PI/360.
  • Method Details

    • getUnitName

      public String getUnitName()
      Returns the name of this TLcdAngleUnit (e.g. Radians, Degrees, Gradians).
      Returns:
      the name of this TLcdAngleUnit (e.g. Radians, Degrees, Gradians).
    • getUnitShortName

      public String getUnitShortName()
      Returns the short name of this TLcdAngleUnit (e.g. rad, deg,gr).
      Returns:
      the short name of this TLcdAngleUnit (e.g. rad, deg,gr).
    • getToRadianFactor

      public double getToRadianFactor()
      Returns the factor to apply to convert an angle expressed in that specific unit into an angle in radians.
      Returns:
      the factor to apply to convert an angle expressed in that specific unit into an angle in radians.
    • getAllAngleUnits

      public static TLcdAngleUnit[] getAllAngleUnits()
      Returns the available angle units to consider in a JVM session.
      Returns:
      the available angle units to consider in a JVM session.
      See Also:
    • setAllAngleUnits

      public static void setAllAngleUnits(TLcdAngleUnit[] aAngleUnits)
      Sets statically all TLcdAngleUnits to consider in a JVM session. Typically, this method should be called in the main of the application.
      Parameters:
      aAngleUnits - the angle units to consider in a JVM session.
      See Also:
    • addAngleUnit

      public static void addAngleUnit(TLcdAngleUnit aAngleUnit)
      Adds the specified angle unit to the set of angle units which are registered for this JVM session.
      Parameters:
      aAngleUnit - an angle unit to be registered for this JVM session.
      Throws:
      IllegalArgumentException - If a angle unit with the same symbol was already registered before.
    • removeAngleUnit

      public static void removeAngleUnit(TLcdAngleUnit aAngleUnit)
      Removes the specified angle unit from the set of angle units which are registered for this JVM session.
      Parameters:
      aAngleUnit - an angle unit to be removed for this JVM session.
      Throws:
      IllegalArgumentException - If the specified angle unit is not contained in the list of registered angle units.
    • toString

      public String toString()
      Returns the unit name.
      Overrides:
      toString in class Object
      Returns:
      the unit name.
    • getUOMName

      public String getUOMName()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The name of the unit of measure
      Specified by:
      getUOMName in interface ILcdISO19103UnitOfMeasure
      Returns:
      the name of the unit of measure
    • getUOMSymbol

      public String getUOMSymbol()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The symbol used for the unit of measure
      Specified by:
      getUOMSymbol in interface ILcdISO19103UnitOfMeasure
      Returns:
      the symbol used for the unit of measure
    • getMeasureType

      public TLcdISO19103MeasureTypeCode getMeasureType()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The type of measure this unit of measure is used for.
      Specified by:
      getMeasureType in interface ILcdISO19103UnitOfMeasure
      Returns:
      TLcdISO19103MeasureTypeCode.ANGLE.
    • getNameOfStandardUnit

      public String getNameOfStandardUnit()
      Description copied from interface: ILcdISO19103UnitOfMeasure
      The name of the standard unit for this type of measures.
      Specified by:
      getNameOfStandardUnit in interface ILcdISO19103UnitOfMeasure
      Returns:
      the name of the standard unit for this type of measures.
    • convertToStandard

      public double convertToStandard(double aValue)
      Converts the value expressed in this unit to radians.
      Specified by:
      convertToStandard in interface ILcdISO19103UnitOfMeasure
      Parameters:
      aValue - a angle expressed in this unit.
      Returns:
      the same angle expressed in radians.
    • convertFromStandard

      public double convertFromStandard(double aValue)
      Converts the value expressed in radians to this unit.
      Specified by:
      convertFromStandard in interface ILcdISO19103UnitOfMeasure
      Parameters:
      aValue - a angle expressed in radians.
      Returns:
      the same angle expressed in this unit.
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object