Locale.FilterTags Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FilterTags(IList<Locale.LanguageRange>, ICollection<String>) |
Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647. |
FilterTags(IList<Locale.LanguageRange>, ICollection<String>, Locale+FilteringMode) |
Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647. |
FilterTags(IList<Locale.LanguageRange>, ICollection<String>)
Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.
[Android.Runtime.Register("filterTags", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;", "", ApiSince=26)]
public static System.Collections.Generic.IList<string> FilterTags (System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> priorityList, System.Collections.Generic.ICollection<string> tags);
[<Android.Runtime.Register("filterTags", "(Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;", "", ApiSince=26)>]
static member FilterTags : System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> * System.Collections.Generic.ICollection<string> -> System.Collections.Generic.IList<string>
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
- tags
- ICollection<String>
language tags
Returns
a list of 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 languages tags using the basic filtering mechanism defined in RFC 4647. This is equivalent to #filterTags(List, Collection, FilteringMode)
when mode
is FilteringMode#AUTOSELECT_FILTERING
.
This filter operation on the given tags
ensures that only unique matching tag(s) are returned with preserved case. In case of duplicate matching tags with the case difference, the first matching tag with preserved case is returned. For example, "de-ch" is returned out of the duplicate matching tags "de-ch" and "de-CH", if "de-ch" is checked first for matching in the given tags
. Note that if the given tags
is an unordered Collection
, the returned matching tag out of duplicate tags is subject to change, depending on the implementation of the Collection
.
Added in 1.8.
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
FilterTags(IList<Locale.LanguageRange>, ICollection<String>, Locale+FilteringMode)
Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.
[Android.Runtime.Register("filterTags", "(Ljava/util/List;Ljava/util/Collection;Ljava/util/Locale$FilteringMode;)Ljava/util/List;", "", ApiSince=26)]
public static System.Collections.Generic.IList<string> FilterTags (System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> priorityList, System.Collections.Generic.ICollection<string> tags, Java.Util.Locale.FilteringMode mode);
[<Android.Runtime.Register("filterTags", "(Ljava/util/List;Ljava/util/Collection;Ljava/util/Locale$FilteringMode;)Ljava/util/List;", "", ApiSince=26)>]
static member FilterTags : System.Collections.Generic.IList<Java.Util.Locale.LanguageRange> * System.Collections.Generic.ICollection<string> * Java.Util.Locale.FilteringMode -> System.Collections.Generic.IList<string>
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
- tags
- ICollection<String>
language tags
- mode
- Locale.FilteringMode
Returns
a list of 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.filterTags(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.