org.marketcetera.util.ws.wrappers
Class MarshalledLocale

java.lang.Object
  extended by 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 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 Summary
protected MarshalledLocale()
          Creates a new marshalled form.
  MarshalledLocale(Locale locale)
          Creates a new marshalled form for the locale given in its raw form.
 
Method Summary
 boolean equals(Object other)
           
 String getCountry()
          Returns the receiver's country.
 String getLanguage()
          Returns the receiver's language.
 String getVariant()
          Returns the receiver's variant.
 int hashCode()
           
 void setCountry(String country)
          Set the receiver's country to the given one.
 void setLanguage(String language)
          Set the receiver's language to the given one.
 void setVariant(String variant)
          Set the receiver's variant to the given one.
 Locale toLocale()
          Returns the raw form of the receiver.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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).

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.