import {LocaleStore} from '@js-joda/root/packages/locale/src/format/LocaleStore.js'
LocaleStore
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.
Constructor Summary
Public Constructor | ||
public |
constructor(valueTextMap: Object) Constructor. |
Method Summary
Public Methods | ||
public |
Gets the text for the specified field value, locale and style for the purpose of printing. |
|
public |
getTextIterator(style: *): * Gets an iterator of text to field for the specified style for the purpose of parsing. |
Public Constructors
public constructor(valueTextMap: Object) source
Constructor.
Params:
Name | Type | Attribute | Description |
valueTextMap | Object | the map of values to text to store, assigned and not altered, not null |
Public Methods
public getText(value: Number, style: TextStyle): * source
Gets the text for the specified field value, locale and style for the purpose of printing.
Params:
Name | Type | Attribute | Description |
value | Number | the value to get text for, not null |
|
style | TextStyle | the style to get text for, not null |
Return:
* | the text for the field value, null if no text found |
public getTextIterator(style: *): * source
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.
Params:
Name | Type | Attribute | Description |
style | * | the style to get text for, null for all parsable text |
Return:
* | the iterator of text to field pairs, in order from longest text to shortest text, null if the style is not parsable |