Class MarshalledLocale

  • All Implemented Interfaces:
    Serializable

    public class MarshalledLocale
    extends Object
    implements Serializable
    The marshalled form for a locale whose raw form is Locale.
    Since:
    1.0.0
    Version:
    $Id: MarshalledLocale.java 16154 2012-07-14 16:34:05Z colin $
    Author:
    tlerios@marketcetera.com
    See Also:
    Serialized Form
    • Constructor Detail

      • MarshalledLocale

        public MarshalledLocale​(Locale locale)
        Creates a new marshalled form for the locale given in its raw form.
        Parameters:
        locale - The locale, which may be null.
      • MarshalledLocale

        protected MarshalledLocale()
        Creates a new marshalled form. This empty constructor is intended for use by JAXB or Java serialization.
    • Method Detail

      • setLanguage

        public void setLanguage​(String language)
        Set the receiver's language to the given one.
        Parameters:
        language - The language.
      • getLanguage

        public String getLanguage()
        Returns the receiver's language.
        Returns:
        The language.
      • setCountry

        public void setCountry​(String country)
        Set the receiver's country to the given one.
        Parameters:
        country - The country.
      • getCountry

        public String getCountry()
        Returns the receiver's country.
        Returns:
        The country.
      • setVariant

        public void setVariant​(String variant)
        Set the receiver's variant to the given one.
        Parameters:
        variant - The variant.
      • getVariant

        public String getVariant()
        Returns the receiver's variant.
        Returns:
        The variant.
      • toLocale

        public Locale toLocale()
        Returns the raw form of the receiver.
        Returns:
        The raw form, which is null if the receiver's language is null (regardless of country or variant).
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object