Package org.mozilla.geckoview
Class TranslationsController.Language
Object
org.mozilla.geckoview.TranslationsController.Language
- All Implemented Interfaces:
Comparable<TranslationsController.Language>
- Enclosing class:
- TranslationsController
public static class TranslationsController.Language
extends Object
implements Comparable<TranslationsController.Language>
Language display information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TranslationsController.Language otherLanguage) Comparator for sorting language objects is based on alphabetizing display languagelocalizedDisplayName.booleanEquality checker for language objects is based on BCP 47 code equalitycode.inthashCode()Required for overriding equals.toString()
-
Field Details
-
code
Language BCP 47 code. -
localizedDisplayName
Language localized display name.
-
-
Constructor Details
-
Language
Language constructor.- Parameters:
code- BCP 47 language codelocalizedDisplayName- how the language should be referred to in the UI.
-
-
Method Details
-
toString
-
compareTo
Comparator for sorting language objects is based on alphabetizing display languagelocalizedDisplayName.- Specified by:
compareToin interfaceComparable<TranslationsController.Language>- Parameters:
otherLanguage- other language being compared- Returns:
- 1 if this object is earlier, 0 if equal, -1 if this object should be later for sorting
-
equals
Equality checker for language objects is based on BCP 47 code equalitycode. -
hashCode
public int hashCode()Required for overriding equals.
-