upidiff.i18n
Class Language

java.lang.Object
  |
  +--upidiff.i18n.Language

public final class Language
extends Object

This class represents a national language selection.

Author:
bmeurer
See Also:
Catalog

Field Summary
private  String country
          The ISO country code for this language.
private  String description
          The descriptive text for this language.
private  String lang
          The ISO language code for this language.
 
Constructor Summary
(package private) Language(String country, String lang, String description)
          Creates a new language selection.
 
Method Summary
 boolean equals(Object other)
          Compares two languages.
 String getCountry()
          Queries the ISO country code.
 String getDescription()
          Queries the descriptive text.
 String getLang()
          Queries the ISO language code.
 Locale locale()
          Queries the locale for this language.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

country

private String country
The ISO country code for this language.


description

private String description
The descriptive text for this language. This text is displayed in the language selector within the GUI.


lang

private String lang
The ISO language code for this language.

Constructor Detail

Language

Language(String country,
         String lang,
         String description)
Creates a new language selection.

Parameters:
country - ISO country code.
lang - ISO language code.
description - Descriptive text for the language.
Method Detail

getCountry

public String getCountry()
Queries the ISO country code.

Returns:
The ISO country code.

getDescription

public String getDescription()
Queries the descriptive text.

Returns:
The language description.

getLang

public String getLang()
Queries the ISO language code.

Returns:
the ISO language code.

locale

public Locale locale()
Queries the locale for this language.

Returns:
The locale represented by this language.
See Also:
Locale

equals

public boolean equals(Object other)
Compares two languages. Two Languages are considered equal if both the country and the language ISO code matches.

Overrides:
equals in class Object
Parameters:
other - Language to compare to.
Returns:
true if the above condition is matched, else false.