Package | Description |
---|---|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
Modifier and Type | Method and Description |
---|---|
PeriodField |
PeriodField.abs()
Returns a copy of this period with a positive amount.
|
PeriodField |
PeriodField.dividedBy(long divisor)
Returns a copy of this period with the amount divided by the specified divisor.
|
PeriodField |
PeriodFields.get(PeriodUnit unit)
Gets the period for the specified unit.
|
PeriodField |
PeriodUnit.getEquivalentPeriod(PeriodUnit requiredUnit)
Gets the period in the specified unit that is equivalent to this unit.
|
PeriodField |
PeriodField.minus(long amount)
Returns a copy of this period with the specified period subtracted.
|
PeriodField |
PeriodField.minus(PeriodField period)
Returns a copy of this period with the specified period subtracted.
|
PeriodField |
PeriodField.multipliedBy(long scalar)
Returns a copy of this period with the amount multiplied by the specified scalar.
|
PeriodField |
PeriodField.negated()
Returns a copy of this period with the amount negated.
|
static PeriodField |
PeriodField.of(long amount,
PeriodUnit unit)
Obtains a
PeriodField from an amount and unit. |
PeriodField |
PeriodField.plus(long amount)
Returns a copy of this period with the specified period added.
|
PeriodField |
PeriodField.plus(PeriodField period)
Returns a copy of this period with the specified period added.
|
PeriodField |
PeriodField.remainder(long divisor)
Returns a copy of this period with the amount as the remainder following
division by the specified divisor.
|
PeriodField |
PeriodField.toEquivalent(PeriodUnit... requiredUnits)
Converts this period to an equivalent in one of the units specified.
|
PeriodField |
PeriodField.toEquivalent(PeriodUnit requiredUnit)
Converts this period to an equivalent in the specified unit.
|
PeriodField |
PeriodFields.toTotal(PeriodUnit unit)
Totals this period in terms of a single unit.
|
PeriodField |
PeriodField.withAmount(long amount)
Returns a copy of this period with a different amount of time.
|
PeriodField |
PeriodField.withUnit(PeriodUnit unit)
Returns a copy of this period with a different unit.
|
Modifier and Type | Method and Description |
---|---|
List<PeriodField> |
PeriodUnit.getEquivalentPeriods()
Gets the periods that are equivalent to this unit.
|
Iterator<PeriodField> |
PeriodFields.iterator()
Iterates through all the single-unit periods in this period.
|
SortedMap<PeriodUnit,PeriodField> |
PeriodFields.toMap()
Returns a
Map equivalent to this period. |
Modifier and Type | Method and Description |
---|---|
int |
PeriodField.compareTo(PeriodField otherPeriod)
Compares this period to the specified period.
|
PeriodField |
PeriodField.minus(PeriodField period)
Returns a copy of this period with the specified period subtracted.
|
static PeriodFields |
PeriodFields.of(PeriodField... periods)
Obtains a
PeriodFields from an array of single-unit periods. |
static PeriodFields |
PeriodFields.of(PeriodField period)
Obtains a
PeriodFields from a single-unit period. |
PeriodField |
PeriodField.plus(PeriodField period)
Returns a copy of this period with the specified period added.
|
PeriodFields |
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.
|
Constructor and Description |
---|
PeriodUnit(String name,
PeriodField equivalentPeriod)
Constructor to create a unit that is derived from another smaller unit.
|
Copyright © 2014. All rights reserved.