Class MarshalledLocale
- java.lang.Object
-
- org.marketcetera.util.ws.wrappers.MarshalledLocale
-
- All Implemented Interfaces:
Serializable
public class MarshalledLocale extends Object implements Serializable
The marshalled form for a locale whose raw form isLocale.- 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 Summary
Constructors Modifier Constructor Description protectedMarshalledLocale()Creates a new marshalled form.MarshalledLocale(Locale locale)Creates a new marshalled form for the locale given in its raw form.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)StringgetCountry()Returns the receiver's country.StringgetLanguage()Returns the receiver's language.StringgetVariant()Returns the receiver's variant.inthashCode()voidsetCountry(String country)Set the receiver's country to the given one.voidsetLanguage(String language)Set the receiver's language to the given one.voidsetVariant(String variant)Set the receiver's variant to the given one.LocaletoLocale()Returns the raw form of the receiver.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mLanguage
private String mLanguage
-
mCountry
private String mCountry
-
mVariant
private String mVariant
-
-
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).
-
-