org.ka2ddo.yaac.osm
Class Length
java.lang.Object
org.ka2ddo.yaac.osm.Length
- All Implemented Interfaces:
- QuantityUnitMeasure<DistanceUnit>
public class Length
- extends java.lang.Object
- implements QuantityUnitMeasure<DistanceUnit>
This class defines a compound object containing a length, width, or height value and the unit of length.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Length
public Length(java.lang.String value)
Length
public Length(float length,
DistanceUnit unit)
Length
public Length(float length)
getMagnitude
public float getMagnitude()
- Specified by:
getMagnitude
in interface QuantityUnitMeasure<DistanceUnit>
getMagnitude
public float getMagnitude(DistanceUnit otherUnit)
- Specified by:
getMagnitude
in interface QuantityUnitMeasure<DistanceUnit>
getMagnitudeInDefaultUnit
public float getMagnitudeInDefaultUnit()
- Specified by:
getMagnitudeInDefaultUnit
in interface QuantityUnitMeasure<DistanceUnit>
getUnit
public DistanceUnit getUnit()
- Specified by:
getUnit
in interface QuantityUnitMeasure<DistanceUnit>
toString
public java.lang.String toString()
- Returns a string representation of the object.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string representation of the object.