| Constructor and Description |
|---|
DurationImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
long |
getDelta()
Return the number of milliseconds left over when calculating the number of
TimeUnit's that fit into the
given time range. |
long |
getQuantity()
Return the calculated quantity of
TimeUnit instances. |
long |
getQuantityRounded(int tolerance)
Return the calculated quantity of
TimeUnit instances, rounded up if Duration.getDelta() is greater than or
equal to the given tolerance. |
TimeUnit |
getUnit()
|
int |
hashCode() |
boolean |
isInFuture()
|
boolean |
isInPast()
|
void |
setDelta(long delta) |
void |
setQuantity(long quantity) |
void |
setUnit(TimeUnit unit) |
String |
toString() |
public long getQuantity()
DurationTimeUnit instances.getQuantity in interface Durationpublic void setQuantity(long quantity)
public void setUnit(TimeUnit unit)
public long getDelta()
DurationTimeUnit's that fit into the
given time range.public void setDelta(long delta)
public boolean isInPast()
Durationpublic boolean isInFuture()
DurationisInFuture in interface Durationpublic long getQuantityRounded(int tolerance)
DurationTimeUnit instances, rounded up if Duration.getDelta() is greater than or
equal to the given tolerance.getQuantityRounded in interface DurationCopyright © 2015 OCPsoft. All Rights Reserved.