#include <LanguageTag.h>
List of all members.
Detailed Description
This class specifies a language in a standard form (based on RFC 3066), including the special language range "*". Note: This class may be extended to support RFC 3066bis in the future.
Constructor & Destructor Documentation
LanguageTag::LanguageTag |
( |
|
) |
|
Constructs an uninitialized LanguageTag object. A method invocation on an uninitialized LanguageTag object will result in the throwing of an UninitializedObjectException. An uninitialized object may be converted into an initialized object only by using the assignment operator with an initialized object.
LanguageTag::LanguageTag |
( |
const String & |
languageTagString |
) |
|
Constructs a LanguageTag object from a language tag String. The syntax of the language tag String is validated, but the subtags are not verified to be values registered with ISO or IANA.
- Parameters:
-
| languageTagString | A String containing a language tag (for example, "en-US"). |
- Exceptions:
-
LanguageTag::LanguageTag |
( |
const LanguageTag & |
languageTag |
) |
|
Copy constructor.
- Parameters:
-
LanguageTag::~LanguageTag |
( |
|
) |
|
Member Function Documentation
String LanguageTag::getCountry |
( |
|
) |
const |
Gets the country code from the second subtag, if present.
- Returns:
- A String containing the country code for this LanguageTag object if the primary subtag is two or three characters in length and the second subtag is two characters in length, an empty String otherwise.
- Exceptions:
-
String LanguageTag::getLanguage |
( |
|
) |
const |
Gets the language value, if present.
- Returns:
- A String containing the language value for this LanguageTag object if the primary subtag is two or three characters in length, an empty String otherwise.
- Exceptions:
-
String LanguageTag::getVariant |
( |
|
) |
const |
Gets the language variant, if applicable. The language variant includes all the subtags after the country code (if present) or language value (if present).
- Returns:
- A String containing the language variant for this LanguageTag object if the primary subtag is two or three characters in length, an empty String otherwise.
- Exceptions:
-
Boolean LanguageTag::operator!= |
( |
const LanguageTag & |
languageTag |
) |
const |
Tests LanguageTag objects for inequality. Comparisons are case-insensitive. Distinct but equivalent language tags are not considered equal. Language range matching is not performed.
- Parameters:
-
- Returns:
- True if the language tags differ in more than just case, false otherwise.
- Exceptions:
-
Assignment operator.
- Parameters:
-
Boolean LanguageTag::operator== |
( |
const LanguageTag & |
languageTag |
) |
const |
Tests LanguageTag objects for equality. Comparisons are case-insensitive. Distinct but equivalent language tags are not considered equal. Language range matching is not performed.
- Parameters:
-
- Returns:
- True if the language tags differ only in case, false otherwise.
- Exceptions:
-
String LanguageTag::toString |
( |
|
) |
const |
Returns a String representation of the language tag.
- Returns:
- A String representing the LanguageTag object in RFC 3066 syntax (for example, "language-country-variant").
- Exceptions:
-
The documentation for this class was generated from the following file:
- /home/builduser/trunk/pkgs/tog-pegasus/BUILD/pegasus/src/Pegasus/Common/LanguageTag.h