{@code PeriodFields} is an immutable period that stores an amount of human-scaletime for a number of units. For example, humans typically measure periods of time in units of years, months, days, hours, minutes and seconds. These concepts are defined by instances of {@link PeriodUnit} in the chronology classes. This classallows an amount to be specified for a number of the units, such as '3 Days and 65 Seconds'.
Basic mathematical operations are provided - plus(), minus(), multipliedBy(), dividedBy() and negated(), all of which return a new instance
A value of zero can also be stored for any unit. This means that a period of zero hours is not equal to a period of zero minutes. However, an empty instance constant exists to represent zero irrespective of unit. The {@link #withZeroesRemoved()} method removes zero values.
{@code PeriodFields} can store units of any kind which makes it usable withany calendar system.
PeriodFields is immutable and thread-safe. @author Stephen Colebourne
|
|