Package org.threeten.bp.format
Class SimpleDateTimeTextProvider.LocaleStore
java.lang.Object
org.threeten.bp.format.SimpleDateTimeTextProvider.LocaleStore
- Enclosing class:
- SimpleDateTimeTextProvider
Stores the text for a single locale.
Some fields have a textual representation, such as day-of-week or month-of-year. These textual representations can be captured in this class for printing and parsing.
This class is immutable and thread-safe.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) StringGets the text for the specified field value, locale and style for the purpose of printing.getTextIterator(TextStyle style) Gets an iterator of text to field for the specified style for the purpose of parsing.
-
Field Details
-
valueTextMap
Map of value to text. -
parsable
Parsable data.
-
-
Constructor Details
-
LocaleStore
Constructor.- Parameters:
valueTextMap- the map of values to text to store, assigned and not altered, not null
-
-
Method Details
-
getText
Gets the text for the specified field value, locale and style for the purpose of printing.- Parameters:
value- the value to get text for, not nullstyle- the style to get text for, not null- Returns:
- the text for the field value, null if no text found
-
getTextIterator
Gets an iterator of text to field for the specified style for the purpose of parsing.The iterator must be returned in order from the longest text to the shortest.
- Parameters:
style- the style to get text for, null for all parsable text- Returns:
- the iterator of text to field pairs, in order from longest text to shortest text, null if the style is not parsable
-