Uses of Class
javax.time.calendar.PeriodFields
Packages that use PeriodFields
Package
Description
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
-
Uses of PeriodFields in javax.time.calendar
Fields in javax.time.calendar declared as PeriodFieldsModifier and TypeFieldDescriptionprivate PeriodFields
Period.periodFields
The cached PeriodFields.static final PeriodFields
PeriodFields.ZERO
A constant for a period of zero.Methods in javax.time.calendar that return PeriodFieldsModifier and TypeMethodDescription(package private) static PeriodFields
PeriodFields.create
(TreeMap<PeriodUnit, PeriodField> periodMap) Internal factory to create an instance using a pre-built map.PeriodFields.dividedBy
(long divisor) Returns a copy of this period with each amount in this period divided by the specified value.PeriodFields.minus
(long amount, PeriodUnit unit) Returns a copy of this period with the specified period subtracted.PeriodFields.minus
(PeriodProvider periodProvider) Returns a copy of this period with the specified period subtracted.PeriodFields.multipliedBy
(long scalar) Returns a copy of this period with each amount in this period multiplied by the specified scalar.PeriodFields.negated()
Returns a copy of this period with each amount in this period negated.PeriodFields.normalized()
Returns a copy of this period with the amounts normalized.PeriodFields.normalizedTo
(PeriodUnit... units) Returns a copy of this period with the amounts normalized to the specified units.static PeriodFields
PeriodFields.of
(long amount, PeriodUnit unit) Obtains aPeriodFields
from an amount and unit.static PeriodFields
PeriodFields.of
(PeriodField period) Obtains aPeriodFields
from a single-unit period.static PeriodFields
PeriodFields.of
(PeriodField... periods) Obtains aPeriodFields
from an array of single-unit periods.static PeriodFields
PeriodFields.of
(PeriodProvider periodProvider) Obtains aPeriodFields
from aPeriodProvider
.static PeriodFields
Obtains aPeriodFields
from aDuration
based on the standard durations of seconds and nanoseconds.static PeriodFields
PeriodFields.ofTotal
(PeriodProvider... periodProviders) Obtains aPeriodFields
by totalling the amounts in a list ofPeriodProvider
instances.PeriodFields.plus
(long amount, PeriodUnit unit) Returns a copy of this period with the specified period added.PeriodFields.plus
(PeriodProvider periodProvider) Returns a copy of this period with the specified period added.PeriodFields.remainder
(PeriodField period) Returns a copy of this period with the modular division remainder of each field calculated with respect to the specified period.PeriodFields.retain
(PeriodUnit... units) Returns a copy of this period with the specified units retained.PeriodFields.retainConvertible
(PeriodUnit... units) Returns a copy of this period with only those units that can be converted to the specified units.PeriodFields.toEquivalent
(PeriodUnit... units) Converts this period to one containing only the units specified.Period.toPeriodFields()
Converts this period to aPeriodFields
.PeriodField.toPeriodFields()
Converts this period to aPeriodFields
.PeriodFields.toPeriodFields()
Converts this period to aPeriodFields
, trivially returningthis
.PeriodProvider.toPeriodFields()
Returns an instance ofPeriodFields
initialized from the state of this object.PeriodFields.with
(long amount, PeriodUnit unit) Returns a copy of this period with the specified amount for the unit.PeriodFields.with
(PeriodProvider periodProvider) Returns a copy of this period with the specified values altered.PeriodFields.without
(PeriodUnit unit) Returns a copy of this period with the specified unit removed.PeriodFields.withZeroesRemoved()
Returns a copy of this period with all zero amounts removed.