| Package | Description |
|---|---|
| org.kocakosm.pitaya.time |
| Modifier and Type | Field and Description |
|---|---|
static Duration |
Duration.ONE_DAY
One day.
|
static Duration |
Duration.ONE_HOUR
One hour.
|
static Duration |
Duration.ONE_MILLISECOND
One millisecond.
|
static Duration |
Duration.ONE_MINUTE
One minute.
|
static Duration |
Duration.ONE_SECOND
One second.
|
static Duration |
Duration.ONE_WEEK
One week.
|
static Duration |
Duration.ZERO
Zero millisecond.
|
| Modifier and Type | Method and Description |
|---|---|
Duration |
Duration.absoluteValue()
Returns a copy of this duration with a positive length.
|
static Duration |
Duration.between(Date start,
Date end)
Creates a new
Duration instance representing the amount of
time elapsed between the given dates. |
Duration |
Duration.dividedBy(int divisor)
Returns the result of dividing this duration by the given divisor.
|
Duration |
Duration.minus(Duration d)
Returns the result of subtracting the given duration from this one.
|
Duration |
Duration.multipliedBy(int factor)
Returns the result of multiplying this duration by the given factor.
|
Duration |
Duration.negated()
Returns the result of negating this duration.
|
static Duration |
Duration.of(Duration... durations)
Creates a new
Duration instance by summing all the given
Durations' values. |
static Duration |
Duration.of(long amount,
TimeUnit unit)
Creates a new
Duration representing the given amount in the
given unit. |
Duration |
Duration.plus(Duration d)
Returns the result of adding the given duration to this duration.
|
static Duration |
Duration.since(Date d)
Creates a new
Duration instance representing the amount of
time elapsed since the given date. |
static Duration |
Duration.until(Date d)
Creates a new
Duration instance representing the amount of
time that will elapse until the given date. |
static Duration |
Duration.valueOf(String duration)
Parses the given duration's
String representation into a
Duration instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
Duration.compareTo(Duration d) |
Duration |
Duration.minus(Duration d)
Returns the result of subtracting the given duration from this one.
|
static Duration |
Duration.of(Duration... durations)
Creates a new
Duration instance by summing all the given
Durations' values. |
Duration |
Duration.plus(Duration d)
Returns the result of adding the given duration to this duration.
|
Copyright © 2012–2015. All rights reserved.