Uses of Class
javax.time.calendar.PeriodUnit
-
Packages that use PeriodUnit Package Description javax.time.calendar Provides classes to manage the human time scale including date, time, date-time and time-zone representations.javax.time.i18n Provides classes representing dates and times in alternate calendar systems. -
-
Uses of PeriodUnit in javax.time.calendar
Subclasses of PeriodUnit in javax.time.calendar Modifier and Type Class Description (package private) static class
ISOChronology.Unit
Single unit subclass, which means fewer classes to load at startup.Fields in javax.time.calendar declared as PeriodUnit Modifier and Type Field Description private PeriodUnit
CalendricalRule. periodRange
The period range, not null.private PeriodUnit
CalendricalRule. periodUnit
The period unit, not null.private PeriodUnit
PeriodField. unit
The unit the period is measured in.private static PeriodUnit[]
Period. UNITS
The ISO period units, trusted to not be altered.Fields in javax.time.calendar with type parameters of type PeriodUnit Modifier and Type Field Description private java.util.TreeMap<PeriodUnit,PeriodField>
PeriodFields. unitFieldMap
The map of periods.Methods in javax.time.calendar that return PeriodUnit Modifier and Type Method Description PeriodUnit
PeriodUnit. getBaseUnit()
Gets the base unit of this unit.PeriodUnit
CalendricalRule. getPeriodRange()
Gets the range that the rule is bound by.PeriodUnit
CalendricalRule. getPeriodUnit()
Gets the unit that the rule is measured in.PeriodUnit
PeriodField. getUnit()
Gets the unit of this period.static PeriodUnit
ISOChronology. period12Hours()
Gets the period unit for twelve hours, as used by AM/PM.static PeriodUnit
ISOChronology. period24Hours()
Gets the period unit for twenty-four hours, that is often treated as a day.static PeriodUnit
ISOChronology. periodCenturies()
Gets the period unit for centuries of 100 years.static PeriodUnit
ISOChronology. periodDays()
Gets the period unit for days.static PeriodUnit
ISOChronology. periodDecades()
Gets the period unit for decades of 10 years.static PeriodUnit
ISOChronology. periodEras()
Gets the period unit for eras.static PeriodUnit
ISOChronology. periodHours()
Gets the period unit for hours of 60 minutes.static PeriodUnit
ISOChronology. periodMicros()
Gets the period unit for microseconds.static PeriodUnit
ISOChronology. periodMillennia()
Gets the period unit for millennia of 1000 years.static PeriodUnit
ISOChronology. periodMillis()
Gets the period unit for milliseconds.static PeriodUnit
ISOChronology. periodMinutes()
Gets the period unit for minutes of 60 seconds.static PeriodUnit
ISOChronology. periodMonths()
Gets the period unit for months.static PeriodUnit
ISOChronology. periodNanos()
Gets the period unit for nanoseconds.static PeriodUnit
ISOChronology. periodQuarters()
Gets the period unit for quarters of 3 months.static PeriodUnit
ISOChronology. periodSeconds()
Gets the period unit for seconds.static PeriodUnit
ISOChronology. periodWeekBasedYears()
Gets the period unit for week-based-years.static PeriodUnit
ISOChronology. periodWeeks()
Gets the period unit for weeks of 7 days.static PeriodUnit
ISOChronology. periodYears()
Gets the period unit for years of 12 months.Methods in javax.time.calendar that return types with arguments of type PeriodUnit Modifier and Type Method Description private java.util.TreeMap<PeriodUnit,PeriodField>
PeriodFields. clonedMap()
Clone the internal data storage map.private static java.util.TreeMap<PeriodUnit,PeriodField>
PeriodFields. createMap()
Creates a new empty map.java.util.SortedMap<PeriodUnit,PeriodField>
PeriodFields. toMap()
Returns aMap
equivalent to this period.Methods in javax.time.calendar with parameters of type PeriodUnit Modifier and Type Method Description int
ISOChronology.Unit. compareTo(PeriodUnit other)
int
PeriodUnit. compareTo(PeriodUnit other)
Compares this unit to another.boolean
PeriodFields. contains(PeriodUnit unit)
Checks whether this period contains an amount for the unit.PeriodField
PeriodFields. get(PeriodUnit unit)
Gets the period for the specified unit.long
PeriodFields. getAmount(PeriodUnit unit)
Gets the amount of this period for the specified unit.int
PeriodFields. getAmountInt(PeriodUnit unit)
Gets the amount of this period for the specified unit converted to anint
.PeriodField
PeriodUnit. getEquivalentPeriod(PeriodUnit requiredUnit)
Gets the period in the specified unit that is equivalent to this unit.boolean
PeriodUnit. isConvertibleTo(PeriodUnit unit)
Checks whether this unit can be converted to the specified unit.PeriodFields
PeriodFields. minus(long amount, PeriodUnit unit)
Returns a copy of this period with the specified period subtracted.PeriodFields
PeriodFields. normalizedTo(PeriodUnit... units)
Returns a copy of this period with the amounts normalized to the specified units.static Period
Period. of(int amount, PeriodUnit unit)
Obtains aPeriod
from an amount and unit.static PeriodField
PeriodField. of(long amount, PeriodUnit unit)
Obtains aPeriodField
from an amount and unit.static PeriodFields
PeriodFields. of(long amount, PeriodUnit unit)
Obtains aPeriodFields
from an amount and unit.PeriodFields
PeriodFields. plus(long amount, PeriodUnit unit)
Returns a copy of this period with the specified period added.PeriodFields
PeriodFields. retain(PeriodUnit... units)
Returns a copy of this period with the specified units retained.PeriodFields
PeriodFields. retainConvertible(PeriodUnit... units)
Returns a copy of this period with only those units that can be converted to the specified units.PeriodField
PeriodField. toEquivalent(PeriodUnit requiredUnit)
Converts this period to an equivalent in the specified unit.PeriodField
PeriodField. toEquivalent(PeriodUnit... requiredUnits)
Converts this period to an equivalent in one of the units specified.PeriodFields
PeriodFields. toEquivalent(PeriodUnit... units)
Converts this period to one containing only the units specified.PeriodField
PeriodFields. toTotal(PeriodUnit unit)
Totals this period in terms of a single unit.PeriodFields
PeriodFields. with(long amount, PeriodUnit unit)
Returns a copy of this period with the specified amount for the unit.PeriodFields
PeriodFields. without(PeriodUnit unit)
Returns a copy of this period with the specified unit removed.PeriodField
PeriodField. withUnit(PeriodUnit unit)
Returns a copy of this period with a different unit.Method parameters in javax.time.calendar with type arguments of type PeriodUnit Modifier and Type Method Description (package private) static PeriodFields
PeriodFields. create(java.util.TreeMap<PeriodUnit,PeriodField> periodMap)
Internal factory to create an instance using a pre-built map.Constructors in javax.time.calendar with parameters of type PeriodUnit Constructor Description CalendricalRule(java.lang.Class<T> reifiedClass, Chronology chronology, java.lang.String name, PeriodUnit periodUnit, PeriodUnit periodRange)
Constructor used to create a rule.DateTimeFieldRule(java.lang.Class<T> reifiedClass, Chronology chronology, java.lang.String name, PeriodUnit periodUnit, PeriodUnit periodRange, int minimumValue, int maximumValue)
Constructor.DateTimeFieldRule(java.lang.Class<T> reifiedClass, Chronology chronology, java.lang.String name, PeriodUnit periodUnit, PeriodUnit periodRange, int minimumValue, int maximumValue, boolean hasText)
Constructor.PeriodField(long amount, PeriodUnit unit)
Constructor.Rule(int ordinal, java.lang.String name, PeriodUnit periodUnit, PeriodUnit periodRange, int minimumValue, int maximumValue, int smallestMaximum)
Constructor parameters in javax.time.calendar with type arguments of type PeriodUnit Constructor Description PeriodFields(java.util.TreeMap<PeriodUnit,PeriodField> periodMap)
Constructs an instance using a pre-built map. -
Uses of PeriodUnit in javax.time.i18n
Subclasses of PeriodUnit in javax.time.i18n Modifier and Type Class Description private static class
CopticChronology.Months
Unit class for months.private static class
CopticChronology.Years
Unit class for years.private static class
HistoricChronology.Months
Unit class for months.private static class
HistoricChronology.Years
Unit class for years.private static class
JulianChronology.Months
Unit class for months.private static class
JulianChronology.Years
Unit class for years.Fields in javax.time.i18n declared as PeriodUnit Modifier and Type Field Description private static PeriodUnit
CopticChronology. MONTHS
Period unit for months.private static PeriodUnit
HistoricChronology. MONTHS
Period unit for months.private static PeriodUnit
JulianChronology. MONTHS
Period unit for months.private static PeriodUnit
CopticChronology. YEARS
Period unit for years.private static PeriodUnit
HistoricChronology. YEARS
Period unit for years.private static PeriodUnit
JulianChronology. YEARS
Period unit for years.Methods in javax.time.i18n that return PeriodUnit Modifier and Type Method Description static PeriodUnit
CopticChronology. periodDays()
Gets the period unit for days.static PeriodUnit
HistoricChronology. periodDays()
Gets the period unit for days.static PeriodUnit
JulianChronology. periodDays()
Gets the period unit for days.static PeriodUnit
HistoricChronology. periodEras()
Gets the period unit for eras.static PeriodUnit
CopticChronology. periodMonths()
Gets the period unit for months.static PeriodUnit
HistoricChronology. periodMonths()
Gets the period unit for months.static PeriodUnit
JulianChronology. periodMonths()
Gets the period unit for months.static PeriodUnit
CopticChronology. periodWeeks()
Gets the period unit for weeks.static PeriodUnit
HistoricChronology. periodWeeks()
Gets the period unit for weeks.static PeriodUnit
JulianChronology. periodWeeks()
Gets the period unit for weeks.static PeriodUnit
CopticChronology. periodYears()
Gets the period unit for years.static PeriodUnit
HistoricChronology. periodYears()
Gets the period unit for years.static PeriodUnit
JulianChronology. periodYears()
Gets the period unit for years.
-