Top Description Fields Constructors Methods
org.python.modules._locale

public Class JyLocale

extends DateSymbolJyLocale
implements PyLocale
Class Inheritance
All Implemented Interfaces
org.python.modules._locale.PyLocale, org.python.modules._locale.DateSymbolLocale
Imports
java.text.Collator, .DecimalFormat, .DecimalFormatSymbols, .NumberFormat, java.util.Locale, org.python.core.Py, .PyDictionary, .PyException, .PyInteger, .PyList, .PyString, .PyUnicode

Sources locale information from standard Java API functions, such as that in java.util.Locale and java.text.DecimalFormat. Used by the _locale module. Callers would not usually interact with this class directly unless working with _locale internals.
Since
Jython 2.7.2

Field Summary

Modifier and TypeField and Description
private final Collator
private final PyDictionary
private final String
Inherited from org.python.modules._locale.DateSymbolJyLocale:
dfSymbolslocale

Constructor Summary

AccessConstructor and Description
public
JyLocale(Locale locale, String encoding)

Method Summary

Modifier and TypeMethod and Description
private static int
private static void
public String
public PyString
public PyString
private PyDictionary
public static boolean
isExtendedWhitespace(char c)

Includes non-breaking space, but not extended codepoints

public PyDictionary
pack-priv static PyDictionary
localeConvForFormat(DecimalFormat decimalFormat, DecimalFormat currencyFormat, String encoding)

Fallbacks provided for charset conversion failures in this method match either the C locale, or plausible lower-risk substitutes, like ISO currency code for currency symbol.

pack-priv static int
pack-priv static int
pack-priv static int
pack-priv static int
pack-priv static int
private static void
putConvUnicodeEntry(PyDictionary result, String key, String value, String fallback, String encoding)

private static void
putConvUnicodeEntry(PyDictionary result, String key, char value, String fallback, String encoding)

private static int
separatedBySpace(String prefix, String suffix)

public int
public PyString
private String
Inherited from org.python.modules._locale.DateSymbolJyLocale:
getAmPmStringsgetMonthsgetShortMonthsgetShortWeekdaysgetWeekdays

Field Detail

collatorback to summary
private final Collator collator
convback to summary
private final PyDictionary conv
encodingback to summary
private final String encoding

Constructor Detail

JyLocaleback to summary
public JyLocale(Locale locale, String encoding)

Method Detail

currencyPrecedesValueback to summary
private static int currencyPrecedesValue(DecimalFormat df, String prefix)
encodingFallbackback to summary
private static void encodingFallback(PyDictionary result, String key, String fallback, PyException pye)
getEncodingback to summary
public String getEncoding()
getLocaleStringback to summary
public PyString getLocaleString()

Implements org.python.modules._locale.PyLocale.getLocaleString.

Annotations
@Override
getUnderlyingLocaleback to summary
public PyString getUnderlyingLocale()

Implements org.python.modules._locale.PyLocale.getUnderlyingLocale.

Annotations
@Override
initLocaleConvback to summary
private PyDictionary initLocaleConv()
isExtendedWhitespaceback to summary
public static boolean isExtendedWhitespace(char c)

Includes non-breaking space, but not extended codepoints

localeconvback to summary
public PyDictionary localeconv()

Implements org.python.modules._locale.PyLocale.localeconv.

Annotations
@Override
localeConvForFormatback to summary
pack-priv static PyDictionary localeConvForFormat(DecimalFormat decimalFormat, DecimalFormat currencyFormat, String encoding)

Fallbacks provided for charset conversion failures in this method match either the C locale, or plausible lower-risk substitutes, like ISO currency code for currency symbol.

negativeCurrencyPrecedesValueback to summary
pack-priv static int negativeCurrencyPrecedesValue(DecimalFormat df)
negativeSeparatedBySpaceback to summary
pack-priv static int negativeSeparatedBySpace(DecimalFormat df)
negativeSignPositionback to summary
pack-priv static int negativeSignPosition(DecimalFormat df)
positiveCurrencyPrecedesValueback to summary
pack-priv static int positiveCurrencyPrecedesValue(DecimalFormat df)
positiveSeparatedBySpaceback to summary
pack-priv static int positiveSeparatedBySpace(DecimalFormat df)
putConvUnicodeEntryback to summary
private static void putConvUnicodeEntry(PyDictionary result, String key, String value, String fallback, String encoding)
putConvUnicodeEntryback to summary
private static void putConvUnicodeEntry(PyDictionary result, String key, char value, String fallback, String encoding)
separatedBySpaceback to summary
private static int separatedBySpace(String prefix, String suffix)
strcollback to summary
public int strcoll(PyString str1, PyString str2)

Implements org.python.modules._locale.PyLocale.strcoll.

Annotations
@Override
strxfrmback to summary
public PyString strxfrm(PyString str)

Implements org.python.modules._locale.PyLocale.strxfrm.

Annotations
@Override
unicoderback to summary
private String unicoder(PyString str)