Additional top-level classes in compilation unit: PeriodBuilderImpl, FixedUnitBuilder, SingleUnitBuilder, OneOrTwoUnitBuilder, MultiUnitBuilder.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private static final short | |
| private PeriodFormatterDataService | |
| private BasicPeriodBuilderFactory. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static long | |
| public PeriodBuilder | Returns: a builderthe single TimeUnit with which to represent times unit)Implements com. |
| public PeriodBuilder | Returns: a builderImplements com. |
| public PeriodBuilder | Returns: a builderImplements com. |
| private BasicPeriodBuilderFactory. | |
| public PeriodBuilder | Returns: a builderImplements com. |
| public PeriodBuilderFactory | setAllowMilliseconds(boolean
whether milliseconds should be allowed. allow)Implements com. |
| public PeriodBuilderFactory | setAllowZero(boolean allow)
Implements com. |
| public PeriodBuilderFactory | setAvailableUnitRange(TimeUnit
the smallest time unit available for use minUnit, TimeUnit the largest time unit available for use maxUnit)Implements com. |
| public PeriodBuilderFactory | setLocale(String localeName)
Implements com. |
| public PeriodBuilderFactory | setMaxLimit(float maxLimit)
Implements com. |
| public PeriodBuilderFactory | setMinLimit(float minLimit)
Implements com. |
| public PeriodBuilderFactory | setTimeZone(TimeZone
the timeZone timeZone)Implements com. |
| public PeriodBuilderFactory | setUnitIsAvailable(TimeUnit
the time unit unit, boolean true if the unit is available for use available)Implements com. |
| public PeriodBuilderFactory | setWeeksAloneOnly(boolean aloneOnly)
Implements com. |
| allBits | back to summary |
|---|---|
| private static final short allBits | |
| ds | back to summary |
|---|---|
| private PeriodFormatterDataService ds | |
| settings | back to summary |
|---|---|
| private BasicPeriodBuilderFactory. | |
| BasicPeriodBuilderFactory | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory(PeriodFormatterDataService ds) | |
| approximateDurationOf | back to summary |
|---|---|
| pack-priv static long approximateDurationOf(TimeUnit unit) | |
| getFixedUnitBuilder | back to summary |
|---|---|
| public PeriodBuilder getFixedUnitBuilder(TimeUnit unit) Implements com. Return a builder that represents relative time in terms of the single given TimeUnit
| |
| getMultiUnitBuilder | back to summary |
|---|---|
| public PeriodBuilder getMultiUnitBuilder(int periodCount) Implements com. Return a builder that formats the given number of periods, starting with the largest period less than or equal to the duration.
| |
| getOneOrTwoUnitBuilder | back to summary |
|---|---|
| public PeriodBuilder getOneOrTwoUnitBuilder() Implements com. Return a builder that formats the largest one or two periods, Starting with the largest period less than or equal to the duration. It formats two periods if the first period has a count < 2 and the next period has a count >= 1.
| |
| getSettings | back to summary |
|---|---|
| private BasicPeriodBuilderFactory. | |
| getSingleUnitBuilder | back to summary |
|---|---|
| public PeriodBuilder getSingleUnitBuilder() Implements com. Return a builder that represents relative time in terms of the largest period less than or equal to the duration.
| |
| setAllowMilliseconds | back to summary |
|---|---|
| public PeriodBuilderFactory setAllowMilliseconds(boolean allow) Implements com. Doc from com. Sets whether milliseconds are allowed. This is only examined when milliseconds are an available field. The default is to allow milliseconds to display normally.
This is intended to be used to set locale-specific behavior. Typically clients will
not call this API and instead call
| |
| setAllowZero | back to summary |
|---|---|
| public PeriodBuilderFactory setAllowZero(boolean allow) Implements com. Doc from com. Sets whether units with a value of zero are represented in a period when 'gaps' appear between time units, e.g. '2 hours, 0 minutes, and 33 seconds'. Default is to not represent these explicitly ('2 hours and 33 seconds').
| |
| setAvailableUnitRange | back to summary |
|---|---|
| public PeriodBuilderFactory setAvailableUnitRange(TimeUnit minUnit, TimeUnit maxUnit) Implements com. Doc from com. Sets the time units available for use. Default is all units.
| |
| setLocale | back to summary |
|---|---|
| public PeriodBuilderFactory setLocale(String localeName) Implements com. Doc from com. Sets the locale for the factory. Setting the locale can adjust the values for some or all of the other properties to reflect language or cultural conventions. Default is to use the default locale.
| |
| setMaxLimit | back to summary |
|---|---|
| public PeriodBuilderFactory setMaxLimit(float maxLimit) Implements com. Doc from com. Sets the maximum value for the largest available time unit (as set in setUnits). Periods that represent a longer duration than this will be pinned to this value of that time unit and return true for 'isMoreThan'. Default is no limit. Setting a value of zero restores the default.
| |
| setMinLimit | back to summary |
|---|---|
| public PeriodBuilderFactory setMinLimit(float minLimit) Implements com. Doc from com. Sets the minimum value for the smallest available time unit (as set in setUnits). Periods that represent a shorter duration than this will be pinned to this value of that time unit and return true for 'isLessThan'. Default is no limit. Setting a value of zero restores the default.
| |
| setTimeZone | back to summary |
|---|---|
| public PeriodBuilderFactory setTimeZone(TimeZone timeZone) Implements com. Doc from com. Sets the time zone for the factory. This can affect the timezone used for date computations.
| |
| setUnitIsAvailable | back to summary |
|---|---|
| public PeriodBuilderFactory setUnitIsAvailable(TimeUnit unit, boolean available) Implements com. Doc from com. Sets whether the time unit is available for use.
| |
| setWeeksAloneOnly | back to summary |
|---|---|
| public PeriodBuilderFactory setWeeksAloneOnly(boolean aloneOnly) Implements com. Doc from com. Sets whether weeks are used with other units, or only when weeks are the only unit. For example '3 weeks and 2 days' versus '23 days'. Default is to use them alone only.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv TimeUnit | |
| pack-priv int | |
| pack-priv TimeUnit | |
| pack-priv short | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public BasicPeriodBuilderFactory. | |
| pack-priv Period | |
| pack-priv TimeUnit | |
| pack-priv short | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. | |
| pack-priv BasicPeriodBuilderFactory. |
| allowMillis | back to summary |
|---|---|
| pack-priv boolean allowMillis | |
| allowZero | back to summary |
|---|---|
| pack-priv boolean allowZero | |
| inUse | back to summary |
|---|---|
| pack-priv boolean inUse | |
| maxLimit | back to summary |
|---|---|
| pack-priv int maxLimit | |
| maxUnit | back to summary |
|---|---|
| pack-priv TimeUnit maxUnit | |
| minLimit | back to summary |
|---|---|
| pack-priv int minLimit | |
| minUnit | back to summary |
|---|---|
| pack-priv TimeUnit minUnit | |
| uset | back to summary |
|---|---|
| pack-priv short uset | |
| weeksAloneOnly | back to summary |
|---|---|
| pack-priv boolean weeksAloneOnly | |
| Settings | back to summary |
|---|---|
| pack-priv Settings() | |
| copy | back to summary |
|---|---|
| public BasicPeriodBuilderFactory. | |
| createLimited | back to summary |
|---|---|
| pack-priv Period createLimited(long duration, boolean inPast) | |
| effectiveMinUnit | back to summary |
|---|---|
| pack-priv TimeUnit effectiveMinUnit() | |
| effectiveSet | back to summary |
|---|---|
| pack-priv short effectiveSet() | |
| setAllowMilliseconds | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setAllowZero | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setInUse | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setLocale | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setMaxLimit | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setMinLimit | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setUnits | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |
| setWeeksAloneOnly | back to summary |
|---|---|
| pack-priv BasicPeriodBuilderFactory. | |