| Package | Description |
|---|---|
| net.time4j.format.expert |
This package contains the expert-level format- and parse engine of Time4J.
|
| Modifier and Type | Method and Description |
|---|---|
<V extends ChronoEntity<V>> |
ChronoFormatter.Builder.addCustomized(ChronoElement<V> element,
ChronoFormatter<V> formatter)
Defines a customized format element for given chronological
element.
|
<V> ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addCustomized(ChronoElement<V> element,
ChronoPrinter<V> printer,
ChronoParser<V> parser)
Defines a customized format element for given chronological
element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addDayPeriod(Map<PlainTime,String> timeToLabels)
Defines a text format for a custom day period.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addDayPeriodApproximate()
Defines a text format for a flexible day period (morning/afternoon etc).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addDayPeriodFixed()
Defines a text format for a fixed day period (am/pm/midnight/noon).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addEnglishOrdinal(ChronoElement<Integer> element)
Defines an ordinal format for given chronological
element in english language.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addFixedDecimal(ChronoElement<BigDecimal> element,
int precision,
int scale)
Defines a fixed unsigned decimal format for given chronological
element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addFixedInteger(ChronoElement<Integer> element,
int digits)
Defines an integer format without sign and with fixed width
for given chronological element.
|
<V extends Enum<V>> |
ChronoFormatter.Builder.addFixedNumerical(ChronoElement<V> element,
int digits)
Defines an integer format without sign and with fixed width
for given chronological enumeration element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addFraction(ChronoElement<Integer> element,
int minDigits,
int maxDigits,
boolean decimalSeparator)
Defines a fractional format for given chronological element
including a possible decimal separator char but without any
integer part by mapping the context-dependent value range to
the interval [0.0-1.0).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addIgnorableWhitespace()
Defines a sequence of optional white space.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addInteger(ChronoElement<Integer> element,
int minDigits,
int maxDigits)
Defines an integer format without sign for given
chronological element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addInteger(ChronoElement<Integer> element,
int minDigits,
int maxDigits,
SignPolicy signPolicy)
Defines an integer format for given chronological
element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLiteral(AttributeKey<Character> attribute)
Defines a literal element with a char which will be searched
in given format attribute.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLiteral(char literal)
Defines a literal element with exactly one char.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLiteral(char literal,
char alt)
Defines a literal element with exactly one char which can also be an alternative char
during parsing.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLiteral(String literal)
Defines a literal element with any chars.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongLocalizedOffset()
Adds a timezone offset in long localized notation.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongNumber(ChronoElement<Long> element,
int minDigits,
int maxDigits,
SignPolicy signPolicy)
Defines an integer format for given chronological
element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongTimezoneName()
Adds a long localized timezone name (in specific non-location format).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addLongTimezoneName(Set<TZID> preferredZones)
Adds a long localized timezone name (in specific non-location format).
|
<V extends Enum<V>> |
ChronoFormatter.Builder.addNumerical(ChronoElement<V> element,
int minDigits,
int maxDigits)
Defines an integer format without sign for given chronological
enumeration element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addOrdinal(ChronoElement<Integer> element,
Map<PluralCategory,String> indicators)
Defines an ordinal format for given chronological
element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addPattern(String formatPattern,
PatternType patternType)
Processes given format pattern of given pattern type to a
sequence of format elements.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addShortLocalizedOffset()
Adds a timezone offset in short localized notation.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addShortTimezoneName()
Adds a short localized timezone name (an abbreviation in specific non-location format).
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addShortTimezoneName(Set<TZID> preferredZones)
Adds a short localized timezone name (an abbreviation in specific non-location format).
|
<V extends Enum<V>> |
ChronoFormatter.Builder.addText(ChronoElement<V> element)
Defines a text format for given chronological element.
|
<V extends Enum<V>> |
ChronoFormatter.Builder.addText(ChronoElement<V> element,
Map<V,String> lookup)
Defines a text format for given chronological element with
user-defined string resources.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addText(TextElement<?> element)
Defines a text format for given chronological element.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addTimezoneID()
Adds a timezone identifier.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addTimezoneOffset()
Adds a timezone offset in typical ISO-8601-notation.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addTimezoneOffset(DisplayMode precision,
boolean extended,
List<String> zeroOffsets)
Adds a timezone offset in canonical notation.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.addTwoDigitYear(ChronoElement<Integer> element)
Defines a special format element for a two-digit-year.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.endSection()
Removes the last sectional attribute.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.or()
Starts a new block inside the current section such that the following parts will only be
taken into account in case of failure according to or-logic.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.padNext(int width)
Defines for the next format element of the same section so
many pad chars until the element width has reached the width
specified.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.padPrevious(int width)
Defines for the previous format element of the same
section so many pad chars until the element width has
reached the width specified.
|
<V> ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.setDefault(ChronoElement<V> element,
V value)
Defines a default value if the parser has not parsed or found a value for given element.
|
<V> ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.setDefaultSupplier(ChronoElement<V> element,
Supplier<V> supplier)
Defines a supplier for a default value if the parser has not parsed or found a value
for given element.
|
static <T> ChronoFormatter.Builder<T> |
ChronoFormatter.setUp(Chronology<T> chronology,
Locale locale)
Constructs a builder for creating formatters.
|
static <T extends ChronoEntity<T>> |
ChronoFormatter.setUp(Class<T> type,
Locale locale)
Constructs a builder for creating formatters.
|
static <C extends CalendarVariant<C>> |
ChronoFormatter.setUpWithOverride(Locale locale,
CalendarFamily<C> overrideCalendar)
Constructs a builder for creating global formatters with usage of given calendar type.
|
static <C extends Calendrical<?,C>> |
ChronoFormatter.setUpWithOverride(Locale locale,
Chronology<C> overrideCalendar)
Constructs a builder for creating global formatters with usage of given calendar type.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.skipUnknown(int keepRemainingChars)
Skips all characters from input as unparseable until at least given count of characters is left.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.skipUnknown(IntPredicate unparseableCondition,
int maxIterations)
Skips all characters accepted by given condition as unparseable.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.startOptionalSection()
Starts a new optional section where errors in parsing will
not cause an exception but just be ignored.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.startOptionalSection(ChronoCondition<ChronoDisplay> printCondition)
Starts a new optional section where errors in parsing will
not cause an exception but just be ignored.
|
<A extends Enum<A>> |
ChronoFormatter.Builder.startSection(AttributeKey<A> key,
A value)
Starts a new section with given sectional attribute.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.startSection(AttributeKey<Boolean> key,
boolean value)
Starts a new section with given sectional attribute.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.startSection(AttributeKey<Character> key,
char value)
Starts a new section with given sectional attribute.
|
ChronoFormatter.Builder<T> |
ChronoFormatter.Builder.startSection(AttributeKey<Integer> key,
int value)
Starts a new section with given sectional attribute.
|
Copyright © 2014–2017. All rights reserved.