| Package | Description |
|---|---|
| net.time4j |
The main package contains four basic types of ISO-8601, namely
PlainDate, PlainTime, PlainTimestamp
and Moment. |
| net.time4j.range |
Interval support.
|
| Modifier and Type | Field and Description |
|---|---|
static TimeMetric<TimeUnit,MachineTime<TimeUnit>> |
MachineTime.ON_POSIX_SCALE
Reversible metric on the POSIX scale (without leap seconds).
|
static TimeMetric<TimeUnit,MachineTime<SI>> |
MachineTime.ON_UTC_SCALE
Reversible metric on the UTC scale (inclusive leap seconds).
|
| Modifier and Type | Method and Description |
|---|---|
MachineTime<U> |
MachineTime.abs()
Converts this machine duration to its absolute amount.
|
MachineTime<U> |
MachineTime.dividedBy(long divisor,
RoundingMode roundingMode)
Divides this duration by given divisor using given rounding mode.
|
static MachineTime<TimeUnit> |
MachineTime.from(Duration threeten)
Converts given JSR-310-duration to a machine time.
|
MachineTime<U> |
MachineTime.inverse()
Creates a copy with inversed sign.
|
MachineTime<U> |
MachineTime.minus(long amount,
U unit)
Subtracts given temporal amount from this machine time.
|
MachineTime<U> |
MachineTime.minus(MachineTime<U> duration)
Subtracts given temporal amount from this machine time.
|
MachineTime<U> |
MachineTime.multipliedBy(double factor)
Multiplies this duration with given decimal factor.
|
MachineTime<U> |
MachineTime.multipliedBy(long factor)
Multiplies this duration with given factor.
|
static MachineTime<SI> |
MachineTime.of(long amount,
SI unit)
Creates a machine time duration on the UTC scale.
|
static MachineTime<TimeUnit> |
MachineTime.of(long amount,
TimeUnit unit)
Creates a machine time duration on the POSIX scale.
|
static MachineTime<TimeUnit> |
MachineTime.ofPosixSeconds(BigDecimal seconds)
Creates a machine time duration on the POSIX scale.
|
static MachineTime<TimeUnit> |
MachineTime.ofPosixSeconds(double seconds)
Creates a machine time duration on the POSIX scale.
|
static MachineTime<TimeUnit> |
MachineTime.ofPosixUnits(long seconds,
int fraction)
Creates a machine time duration on the POSIX scale.
|
static MachineTime<SI> |
MachineTime.ofSISeconds(BigDecimal seconds)
Creates a machine time duration on the UTC scale.
|
static MachineTime<SI> |
MachineTime.ofSISeconds(double seconds)
Creates a machine time duration on the UTC scale.
|
static MachineTime<SI> |
MachineTime.ofSIUnits(long seconds,
int fraction)
Creates a machine time duration on the UTC scale.
|
MachineTime<U> |
MachineTime.plus(long amount,
U unit)
Add given temporal amount to this machine time.
|
MachineTime<U> |
MachineTime.plus(MachineTime<U> duration)
Add given temporal amount to this machine time.
|
| Modifier and Type | Method and Description |
|---|---|
static Collector<MachineTime<TimeUnit>,?,MachineTime<TimeUnit>> |
MachineTime.summingUpPosix()
Helps to sum up durations of a stream.
|
static Collector<MachineTime<TimeUnit>,?,MachineTime<TimeUnit>> |
MachineTime.summingUpPosix()
Helps to sum up durations of a stream.
|
static Collector<MachineTime<SI>,?,MachineTime<SI>> |
MachineTime.summingUpReal()
Helps to sum up durations of a stream.
|
static Collector<MachineTime<SI>,?,MachineTime<SI>> |
MachineTime.summingUpReal()
Helps to sum up durations of a stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
MachineTime.compareTo(MachineTime<U> other)
Method of the
Comparable-interface. |
boolean |
MachineTime.isLongerThan(MachineTime<U> other)
Compares the absolute lengths and is equivalent to
abs().compareTo(other.abs()) > 0. |
boolean |
MachineTime.isShorterThan(MachineTime<U> other)
Compares the absolute lengths and is equivalent to
abs().compareTo(other.abs()) < 0. |
Moment |
Moment.minus(MachineTime<SI> realTime)
Subtracts given real time from this timestamp on the UTC time scale.
|
MachineTime<U> |
MachineTime.minus(MachineTime<U> duration)
Subtracts given temporal amount from this machine time.
|
Moment |
Moment.plus(MachineTime<SI> realTime)
Adds given real time to this timestamp on the UTC time scale.
|
MachineTime<U> |
MachineTime.plus(MachineTime<U> duration)
Add given temporal amount to this machine time.
|
| Modifier and Type | Method and Description |
|---|---|
MachineTime<SI> |
MomentInterval.getRealDuration()
Yields the length of this interval on the UTC-scale.
|
MachineTime<TimeUnit> |
MomentInterval.getSimpleDuration()
Yields the length of this interval on the POSIX-scale.
|
| Modifier and Type | Method and Description |
|---|---|
Stream<Moment> |
MomentInterval.stream(MachineTime<?> duration)
Obtains a stream iterating over every moment which is the result of addition of given duration
to start until the end of this interval is reached.
|
static Stream<Moment> |
MomentInterval.stream(MachineTime<?> duration,
Moment start,
Moment end)
Obtains a stream iterating over every moment which is the result of addition of given duration
to start until the end is reached.
|
static MomentInterval |
MomentInterval.surrounding(Moment moment,
MachineTime<?> duration,
double alignment)
Creates an interval surrounding given moment.
|
Copyright © 2014–2021. All rights reserved.