Lines Matching defs:list

33  * LocaleList is an immutable list of Locales, typically used to keep an ordered list of user
38 // This is a comma-separated list of the locales in the LocaleList created at construction time,
143 * Retrieves a String representation of the language tags in this list.
154 * which returns a pre-constructed empty list.</p>
159 public LocaleList(@NonNull Locale... list) {
160 if (list.length == 0) {
164 final Locale[] localeList = new Locale[list.length];
167 for (int i = 0; i < list.length; i++) {
168 final Locale l = list[i];
170 throw new NullPointerException("list[" + i + "] is null");
172 throw new IllegalArgumentException("list[" + i + "] is a repetition");
177 if (i < list.length - 1) {
189 * Constructs a locale list, with the topLocale moved to the front if it already is
261 * @param list The language tags to be included as a single {@link String} separated by commas.
265 public static LocaleList forLanguageTags(@Nullable String list) {
266 if (list == null || list.equals("")) {
269 final String[] tags = list.split(",");
348 if (mList.length == 0) { // empty locale list
374 // no match was found, so we fall back to the first locale in the locale list
388 * Returns the first match in the locale list given an unordered array of supported locales
391 * @return The first {@link Locale} from this list that appears in the given array, or
445 // that we have some meaninful locale in the collection, so the list is not "practically
470 * not necessarily at the top of the list. The default locale not being at the top of the list
485 // It's either the first time someone has asked for the default locale list, or
487 // locale list. So let's recalculate the locale list.
491 // default locale list, so we don't need to construct a new locale list.
506 * Returns the default locale list, adjusted by moving the default locale to its first
511 getDefault(); // to recalculate the default locale list, if necessary
519 * list.
529 * This may be used directly by system processes to set the default locale list for apps. For
530 * such uses, the default locale list would always come from the user preferences, but the
532 * list (based on the locales the app supports).