Class Length

java.lang.Object
org.ka2ddo.yaac.osm.Length
All Implemented Interfaces:
QuantityUnitMeasure<DistanceUnit>

public class Length extends Object implements QuantityUnitMeasure<DistanceUnit>
This class defines a compound object containing a length, width, or height value and the unit of length.
Author:
Andrew Pavlin, KA2DDO
  • Constructor Details

    • Length

      public Length(String value)
      Decode a Length value from the specified String representation.
      Parameters:
      value - a String representation of a length
      Throws:
      IllegalArgumentException - if the string cannot be successfully parsed
    • Length

      public Length(float length, DistanceUnit unit)
      Create a Length with the specified magnitude.
      Parameters:
      length - float length value in the specified units
      unit - DistanceUnit of the length value
    • Length

      public Length(float length)
      Create a Length with the specified magnitude in meters.
      Parameters:
      length - float length value in meters
  • Method Details