|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.spi.LocaleServiceProvider
javax.time.calendar.format.DateTimeTextProvider
javax.time.calendar.format.SimpleDateTimeTextProvider
public final class SimpleDateTimeTextProvider
The Service Provider Implementation to obtain date-time text for a rule.
This implementation is based on extraction of data from a DateFormatSymbols.
This class is thread-safe.
| Constructor Summary | |
|---|---|
SimpleDateTimeTextProvider()
|
|
| Method Summary | |
|---|---|
java.util.Locale[] |
getAvailableLocales()
|
java.lang.String |
getText(DateTimeField field,
TextStyle style,
java.util.Locale locale)
Gets the text for the specified field, locale and style for the purpose of printing. |
java.util.Iterator<java.util.Map.Entry<java.lang.String,DateTimeField>> |
getTextIterator(DateTimeRule rule,
TextStyle style,
java.util.Locale locale)
Gets an iterator of text to field for the specified rule, locale and style for the purpose of parsing. |
| Methods inherited from class javax.time.calendar.format.DateTimeTextProvider |
|---|
createEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleDateTimeTextProvider()
| Method Detail |
|---|
public java.util.Locale[] getAvailableLocales()
getAvailableLocales in class java.util.spi.LocaleServiceProvider
public java.lang.String getText(DateTimeField field,
TextStyle style,
java.util.Locale locale)
DateTimeTextProviderThe text associated with the value is returned. The null return value should be used if there is no applicable text, or if the text would be a numeric representation of the value.
getText in class DateTimeTextProviderfield - the field to get text for, not nullstyle - the style to get text for, not nulllocale - the locale to get text for, not null
public java.util.Iterator<java.util.Map.Entry<java.lang.String,DateTimeField>> getTextIterator(DateTimeRule rule,
TextStyle style,
java.util.Locale locale)
DateTimeTextProviderThe iterator must be returned in order from the longest text to the shortest.
The null return value should be used if there is no applicable parsable text, or if the text would be a numeric representation of the value. Text can only be parsed if all the values for that rule-style-locale combination are unique.
getTextIterator in class DateTimeTextProviderrule - the rule to get text for, not nullstyle - the style to get text for, null for all parsable textlocale - the locale to get text for, not null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||