public class Length extends Quantity
Constructor and Description |
---|
Length(Double inValue,
LengthUnit inUnit) |
Length(Float inValue,
LengthUnit inUnit) |
Length(Float inValue,
String inUnit)
Convenience constructor that will call LengthUnit.valueOf() on the specified unit string.
|
Length(Integer inValue,
LengthUnit inUnit) |
Length(Integer inValue,
String inUnit)
Convenience constructor that will call LengthUnit.valueOf() on the specified unit string.
|
Length(String inValue)
Convenience constructor.
|
Modifier and Type | Method and Description |
---|---|
Length |
convertTo(LengthUnit inUnit)
Returns the length in the specified units.
|
LengthUnit |
getUnit() |
add, autoScale, autoScale, compareTo, convertTo, divideBy, doubleValue, equals, floatValue, greaterThan, greaterThanOrEqualTo, hashCode, intValue, invert, lessThan, lessThanOrEqualTo, longValue, multiplyBy, scale, subtract, toString, toString, toString, verifyQuantityType
public Length(Float inValue, String inUnit)
inValue
- the numeric amount as a floatinUnit
- the length unit of the specified amountpublic Length(Integer inValue, String inUnit)
inValue
- the numeric amount as an integerinUnit
- the length unit of the specified amountpublic Length(Double inValue, LengthUnit inUnit)
public Length(Float inValue, LengthUnit inUnit)
public Length(Integer inValue, LengthUnit inUnit)
public LengthUnit getUnit()
public Length convertTo(LengthUnit inUnit)
jataylor@hairyfatguy.com