Udostępnij za pośrednictwem


Locale.Filter Method

Definition

Overloads

Filter(IList<Locale.LanguageRange>, ICollection<Locale>, Locale+FilteringMode)

Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647.

Filter(IList<Locale.LanguageRange>, ICollection<Locale>)

Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647.

Filter(IList<Locale.LanguageRange>, ICollection<Locale>, Locale+FilteringMode)

Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647.

[Android.Runtime.Register("filter", "(Ljava/util/List;Ljava/util/Collection;Ljava/util/Locale$FilteringMode;)Ljava/util/List;", "", ApiSince=26)]
public static System.Collections.Generic.IList<Java.Util.Locale> Filter (System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> priorityList, System.Collections.Generic.ICollection<Java.Util.Locale> locales, Java.Util.Locale.FilteringMode mode);
[<Android.Runtime.Register("filter", "(Ljava/util/List;Ljava/util/Collection;Ljava/util/Locale$FilteringMode;)Ljava/util/List;", "", ApiSince=26)>]
static member Filter : System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> * System.Collections.Generic.ICollection<Java.Util.Locale> * Java.Util.Locale.FilteringMode -> System.Collections.Generic.IList<Java.Util.Locale>

Parameters

priorityList
IList<Locale.LanguageRange>

user's Language Priority List in which each language tag is sorted in descending order based on priority or weight

locales
ICollection<Locale>

Locale instances used for matching

Returns

a list of Locale instances for matching language tags sorted in descending order based on priority or weight, or an empty list if nothing matches. The list is modifiable.

Attributes

Remarks

Java documentation for java.util.Locale.filter(java.util.List, java.util.Collection).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Filter(IList<Locale.LanguageRange>, ICollection<Locale>)

Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647.

[Android.Runtime.Register("filter", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;", "", ApiSince=26)]
public static System.Collections.Generic.IList<Java.Util.Locale> Filter (System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> priorityList, System.Collections.Generic.ICollection<Java.Util.Locale> locales);
[<Android.Runtime.Register("filter", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;", "", ApiSince=26)>]
static member Filter : System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> * System.Collections.Generic.ICollection<Java.Util.Locale> -> System.Collections.Generic.IList<Java.Util.Locale>

Parameters

priorityList
IList<Locale.LanguageRange>

user's Language Priority List in which each language tag is sorted in descending order based on priority or weight

locales
ICollection<Locale>

Locale instances used for matching

Returns

a list of Locale instances for matching language tags sorted in descending order based on priority or weight, or an empty list if nothing matches. The list is modifiable.

Attributes

Remarks

Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647. This is equivalent to #filter(List, Collection, FilteringMode) when mode is FilteringMode#AUTOSELECT_FILTERING.

This filter operation on the given locales ensures that only unique matching locale(s) are returned.

Added in 1.8.

Java documentation for java.util.Locale.filter(java.util.List<java.util.Locale.LanguageRange>, java.util.Collection<java.util.Locale>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to