T - compared elements typepublic abstract class AbstractCountryComparator<T> extends Object implements Comparator<T>
Comparator for sorting based on provided elements country and priority Locale country.LanguageManager| Modifier and Type | Field and Description |
|---|---|
protected Locale |
locale
Priority
Locale. |
| Constructor and Description |
|---|
AbstractCountryComparator(Locale locale)
Constructs new
AbstractCountryComparator. |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareCountries(String country1,
String country2)
Returns result of two countries comparison.
|
protected int |
noCountryPriority(String country1,
String country2)
Returns result of two countries comparison with no locale priority.
|
protected int |
sameCountryPriority(String country1,
String country2)
Returns result of two countries comparison with locale priority.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic AbstractCountryComparator(Locale locale)
AbstractCountryComparator.locale - priority Localeprotected int compareCountries(String country1, String country2)
country1 - first countrycountry2 - second countryprotected int sameCountryPriority(String country1, String country2)
country1 - first countrycountry2 - second countryCopyright © 2020. All rights reserved.