public class TimeSpan extends Quantity
Constructor and Description |
---|
TimeSpan(Double inValue,
TimeUnit inUnit) |
TimeSpan(Float inValue,
String inUnit)
Convenience constructor that will call TimeUnit.valueOf() on the specified unit string.
|
TimeSpan(Float inValue,
TimeUnit inUnit) |
TimeSpan(Integer inValue,
String inUnit)
Convenience constructor that will call TimeUnit.valueOf() on the specified unit string.
|
TimeSpan(Integer inValue,
TimeUnit inUnit) |
TimeSpan(Long inValue,
String inUnit)
Convenience constructor that will call TimeUnit.valueOf() on the specified unit string.
|
TimeSpan(Long inValue,
TimeUnit inUnit) |
TimeSpan(String inValue)
Convenience constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getMilliseconds()
Returns the time span's length in milliseconds.
|
TimeUnit |
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 TimeSpan(Float inValue, String inUnit)
inValue
- the numeric amount as a floatinUnit
- the time unit of the specified amountpublic TimeSpan(Integer inValue, String inUnit)
inValue
- the numeric amount as an integerinUnit
- the time unit of the specified amountpublic TimeSpan(Long inValue, String inUnit)
inValue
- the numeric amount as a longinUnit
- the time unit of the specified amountpublic long getMilliseconds()
jataylor@hairyfatguy.com