com.sas.iquery.execution2
Class MLSLocaleCache

com.sas.iquery.execution2.MLSLocaleCache

public class MLSLocaleCache

This is based off the Java Locale class internal locale management.


Method Summary
static java.util.Locale getInstance(java.lang.String language, java.lang.String country, java.lang.String variant)
          Returns a Locale constructed from the given language, country and variant.
static java.util.Locale getInstanceFromSASLocale(java.lang.String localeString)
           
static java.util.Locale putInstance(java.util.Locale inLocale)
          If the Locale has not been cached then places it into the cache and returns it.
 

Method Detail

getInstance

public static java.util.Locale getInstance(java.lang.String language,
                                           java.lang.String country,
                                           java.lang.String variant)
Returns a Locale constructed from the given language, country and variant. If the same Locale instance is available in the cache, then that instance is returned. Otherwise, a new Locale instance is created and cached.

Parameters:
language - lowercase two-letter ISO-639 code.
country - uppercase two-letter ISO-3166 code.
variant - vendor and browser specific code. See class description.
Returns:
the Locale instance requested
Throws:
java.lang.NullPointerException - if any argument is null.

putInstance

public static java.util.Locale putInstance(java.util.Locale inLocale)
If the Locale has not been cached then places it into the cache and returns it. If and Locale instance with the same language, country and variant already is available in the cache, then that instance is returned.

Parameters:
inLocale -
Returns:
the Locale instance passed in or matching already cached locale instance.
Throws:
java.lang.NullPointerException - if any of the language, country or variant are null.

getInstanceFromSASLocale

public static java.util.Locale getInstanceFromSASLocale(java.lang.String localeString)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.