Uses of Class
net.time4j.MachineTime
Package
Description
The main package contains four basic types of ISO-8601, namely
PlainDate
, PlainTime
, PlainTimestamp
and Moment
.Interval support.
-
Uses of MachineTime in net.time4j
Modifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionMachineTime.abs()
Converts this machine duration to its absolute amount.MachineTime.dividedBy(long divisor, RoundingMode roundingMode)
Divides this duration by given divisor using given rounding mode.static MachineTime<TimeUnit>
Converts given JSR-310-duration to a machine time.MachineTime.inverse()
Creates a copy with inversed sign.Subtracts given temporal amount from this machine time.MachineTime.minus(MachineTime<U> duration)
Subtracts given temporal amount from this machine time.MachineTime.multipliedBy(double factor)
Multiplies this duration with given decimal factor.MachineTime.multipliedBy(long factor)
Multiplies this duration with given factor.static MachineTime<TimeUnit>
Creates a machine time duration on the POSIX scale.static MachineTime<SI>
Creates a machine time duration on the UTC scale.static MachineTime<TimeUnit>
MachineTime.ofPosixSeconds(double seconds)
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.ofPosixUnits(long seconds, int fraction)
Creates a machine time duration on the POSIX scale.static MachineTime<SI>
MachineTime.ofSISeconds(double seconds)
Creates a machine time duration on the UTC scale.static MachineTime<SI>
MachineTime.ofSISeconds(BigDecimal 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.Add given temporal amount to this machine time.MachineTime.plus(MachineTime<U> duration)
Add given temporal amount to this machine time.Modifier and TypeMethodDescriptionstatic 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 TypeMethodDescriptionint
MachineTime.compareTo(MachineTime<U> other)
Method of theComparable
-interface.boolean
MachineTime.isLongerThan(MachineTime<U> other)
Compares the absolute lengths and is equivalent toabs().compareTo(other.abs()) > 0
.boolean
MachineTime.isShorterThan(MachineTime<U> other)
Compares the absolute lengths and is equivalent toabs().compareTo(other.abs()) < 0
.MachineTime.minus(MachineTime<U> duration)
Subtracts given temporal amount from this machine time.Moment.minus(MachineTime<SI> realTime)
Subtracts given real time from this timestamp on the UTC time scale.MachineTime.plus(MachineTime<U> duration)
Add given temporal amount to this machine time.Moment.plus(MachineTime<SI> realTime)
Adds given real time to this timestamp on the UTC time scale. -
Uses of MachineTime in net.time4j.range
Modifier and TypeMethodDescriptionMomentInterval.getRealDuration()
Yields the length of this interval on the UTC-scale.MomentInterval.getSimpleDuration()
Yields the length of this interval on the POSIX-scale.Modifier and TypeMethodDescriptionMomentInterval.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.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.