Setters on the factory mutate the factory and return it, for chaining.
Subclasses override getFormatter to return a custom DurationFormatter.
| Modifier and Type | Field and Description |
|---|---|
| private PeriodBuilder | |
| private BasicDurationFormatter | |
| private DateFormatter | |
| private long | |
| private PeriodFormatter | |
| private String | |
| private BasicPeriodFormatterService | |
| private TimeZone |
| Access | Constructor and Description |
|---|---|
| pack-priv | BasicDurationFormatterFactory(BasicPeriodFormatterService ps)
Create a default formatter for the current locale and time zone. |
| Modifier and Type | Method and Description |
|---|---|
| protected BasicDurationFormatter | |
| public DateFormatter | Returns: the fallback formatter, or null if there is no fallback formatterReturn the current fallback formatter. |
| public long | Returns: the limit, or 0 if there is no fallback.Return the current fallback formatter limit |
| public DurationFormatter | Returns: a BasicDurationFormatterImplements com. |
| public String | |
| public PeriodBuilder | |
| public PeriodFormatter | |
| public TimeZone | |
| protected void | |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactorythe fallback formatter to use, or null fallback)Implements com. |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactorythe fallback limit to use, or 0 if none is desired. fallbackLimit)Implements com. |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactorythe name of the Locale localeName)Implements com. |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactorythe builder to use builder)Implements com. |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactorythe formatter to use formatter)Implements com. |
| public DurationFormatterFactory | Returns: this BasicDurationFormatterFactoryThe time zone to use. timeZone)Implements com. |
| builder | back to summary |
|---|---|
| private PeriodBuilder builder | |
| f | back to summary |
|---|---|
| private BasicDurationFormatter f | |
| fallback | back to summary |
|---|---|
| private DateFormatter fallback | |
| fallbackLimit | back to summary |
|---|---|
| private long fallbackLimit | |
| formatter | back to summary |
|---|---|
| private PeriodFormatter formatter | |
| localeName | back to summary |
|---|---|
| private String localeName | |
| ps | back to summary |
|---|---|
| private BasicPeriodFormatterService ps | |
| timeZone | back to summary |
|---|---|
| private TimeZone timeZone | |
| BasicDurationFormatterFactory | back to summary |
|---|---|
| pack-priv BasicDurationFormatterFactory(BasicPeriodFormatterService ps) Create a default formatter for the current locale and time zone. | |
| createFormatter | back to summary |
|---|---|
| protected BasicDurationFormatter createFormatter() Create the formatter. All local fields are already initialized. | |
| getFallback | back to summary |
|---|---|
| public DateFormatter getFallback() Return the current fallback formatter.
| |
| getFallbackLimit | back to summary |
|---|---|
| public long getFallbackLimit() Return the current fallback formatter limit
| |
| getFormatter | back to summary |
|---|---|
| public DurationFormatter getFormatter() Implements com. Return a formatter based on this factory's current settings.
| |
| getLocaleName | back to summary |
|---|---|
| public String getLocaleName() Return the current locale name.
| |
| getPeriodBuilder | back to summary |
|---|---|
| public PeriodBuilder getPeriodBuilder() Return the current builder.
| |
| getPeriodFormatter | back to summary |
|---|---|
| public PeriodFormatter getPeriodFormatter() Return the current period formatter.
| |
| getTimeZone | back to summary |
|---|---|
| public TimeZone getTimeZone() Return the current locale name.
| |
| reset | back to summary |
|---|---|
| protected void reset() Clear the cached formatter. Subclasses must call this if their state has changed. This is automatically invoked by setBuilder, setFormatter, setFallback, setLocaleName, and setTimeZone | |
| setFallback | back to summary |
|---|---|
| public DurationFormatterFactory setFallback(DateFormatter fallback) Implements com. Set a fallback formatter for durations over a given limit.
| |
| setFallbackLimit | back to summary |
|---|---|
| public DurationFormatterFactory setFallbackLimit(long fallbackLimit) Implements com. Set a fallback limit for durations over a given limit.
| |
| setLocale | back to summary |
|---|---|
| public DurationFormatterFactory setLocale(String localeName) Implements com. Set the name of the locale that will be used when creating new formatters.
| |
| setPeriodBuilder | back to summary |
|---|---|
| public DurationFormatterFactory setPeriodBuilder(PeriodBuilder builder) Implements com. Set the builder used by the factory. New formatters created with this factory will use the given locale.
| |
| setPeriodFormatter | back to summary |
|---|---|
| public DurationFormatterFactory setPeriodFormatter(PeriodFormatter formatter) Implements com. Set the period formatter used by the factory. New formatters created with this factory will use the given period formatter.
| |
| setTimeZone | back to summary |
|---|---|
| public DurationFormatterFactory setTimeZone(TimeZone timeZone) Implements com. Set the name of the locale that will be used when creating new formatters.
| |