Package javax.time.calendar.format
Class DateTimeFormatterProvider
- java.lang.Object
-
- java.util.spi.LocaleServiceProvider
-
- javax.time.calendar.format.DateTimeFormatterProvider
-
- Direct Known Subclasses:
DateTimeFormatterProviderImpl
public abstract class DateTimeFormatterProvider extends java.util.spi.LocaleServiceProviderThe Service Provider Interface (SPI) to be implemented by classes providing date-time formatting information.DateTimeFormatterProvider is an abstract class and must be implemented with care. Implementations must be thread-safe. It is strongly recommended that implementations cache the returned formatters.
-
-
Constructor Summary
Constructors Constructor Description DateTimeFormatterProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract DateTimeFormattergetFormatter(DateTimeFormatterBuilder.FormatStyle dateStyle, DateTimeFormatterBuilder.FormatStyle timeStyle, java.util.Locale locale, Chronology chronology)Gets a localized date, time or date-time format.
-
-
-
Method Detail
-
getFormatter
public abstract DateTimeFormatter getFormatter(DateTimeFormatterBuilder.FormatStyle dateStyle, DateTimeFormatterBuilder.FormatStyle timeStyle, java.util.Locale locale, Chronology chronology)
Gets a localized date, time or date-time format.- Parameters:
dateStyle- the date formatter style to obtain, null to obtain a time formattertimeStyle- the time formatter style to obtain, null to obtain a date formatterlocale- the locale to use, not nullchronology- the chronology to use, not null- Returns:
- the date-time formatter, never null
- Throws:
java.lang.IllegalArgumentException- if both format styles are nulljava.lang.IllegalArgumentException- if the locale is not a recognized locale
-
-