U - generic type of time unitP - generic type of duration objectpublic interface TimeMetric<U,P>
Computes temporal distances on a time axis as time spans.
| Modifier and Type | Method and Description |
|---|---|
<T extends TimePoint<? super U,T>> |
between(T start,
T end)
Computes the temporal distance between two time points.
|
default TimeMetric<U,P> |
reversible()
Obtains a modified metric which has reversible characteristics.
|
<T extends TimePoint<? super U,T>> P between(T start, T end)
Computes the temporal distance between two time points.
Important note: This method might not work in Java 6 under some circumstances.
In case of any problem users can use the equivalent method until() defined in the class
TimePoint.
T - generic type of time pointstart - first time pointend - second time pointstart is after endTimePoint.until(TimePoint, TimeMetric)default TimeMetric<U,P> reversible()
Obtains a modified metric which has reversible characteristics.
Usually metrics are not reversible by default. The default implementation throws
an UnsupportedOperationException. Overriding implementations should
document the details of reversal characteristics.
UnsupportedOperationException - if not supportedCopyright © 2014–2021. All rights reserved.