Home Reference Source
public class | source

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

getText(value: Number, style: TextStyle): *

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
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