|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
com.dautelle.math.numbers.RealtimeNumber
com.dautelle.physics.Quantity
com.dautelle.physics.Duration
This class represents a period of existence or persistence. The system unit for this quantity is "s" (Système International d'Unités).
Nested Class Summary |
Nested classes inherited from class com.dautelle.physics.Quantity |
Quantity.Factory, Quantity.Value |
Field Summary | |
static Duration |
ZERO
Represents a Duration amounting to nothing. |
Constructor Summary | |
protected |
Duration()
Default constructor (allows for derivation). |
Method Summary | |
java.util.Date |
addTo(java.util.Date date)
Returns the date after the specified date. |
static Duration |
between(java.util.Date from,
java.util.Date to)
Returns the Duration from the ellapsed time between two dates. |
static Duration |
durationOf(Quantity quantity)
Returns the Duration corresponding to the specified quantity. |
static void |
showAs(Unit unit)
Shows Duration instances in the specified unit. |
java.util.Date |
subtractFrom(java.util.Date date)
Returns the date before the specified date. |
Methods inherited from class com.dautelle.physics.Quantity |
abs, add, appendTo, approxEquals, approxEquals, compareTo, divide, divide, doubleValue, doubleValue, equals, floatValue, floatValue, getAbsoluteError, getMaximum, getMinimum, getOutputUnit, getRelativeError, getSystemUnit, hashCode, intValue, intValue, inverse, isPossiblyZero, longValue, longValue, multiply, multiply, negate, opposite, plus, pow, random, reciprocal, root, subtract, times, toString, toString, toXml, valueOf, valueOf, valueOf, valueOf |
Methods inherited from class com.dautelle.math.numbers.RealtimeNumber |
clone, export, isLocalObject, isPoolObject, pow, recycle, toHeap |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Duration ZERO
Duration
amounting to nothing.
Constructor Detail |
protected Duration()
Method Detail |
public static Duration durationOf(Quantity quantity)
Duration
corresponding to the specified quantity.
quantity
- a quantity compatible with Duration
.
Duration
instance.
ConversionException
- if the current model does not allow the
specified quantity to be converted to Duration
.public static void showAs(Unit unit)
Duration
instances in the specified unit.
unit
- the output unit for Duration
instances.Quantity.getOutputUnit()
public static Duration between(java.util.Date from, java.util.Date to)
Duration
from the ellapsed time between two dates.
from
- the departure date.to
- the arrival date.
public java.util.Date addTo(java.util.Date date)
Duration
.
date
- the date of origin.
date + this
.public java.util.Date subtractFrom(java.util.Date date)
Duration
.
date
- the date of origin.
date - this
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |