Java Reference
In-Depth Information
filterTags(List<Locale.LanguageRange>,
Collection<String>, Locale.FilteringMode)
(Returns matching list of language tags)
To work with each of the methods, a sorted priority order should be sent as the first
parameter. This priority order is a list of Locale.LanguageRange objects, and it
should be sorted in descending order, based on priority or weight. The second argument
in the filter() methods is a collection of locales. This collection contains the loc-
ales that will be filtered. The optional third argument contains a
Locale.FilteringMode . Table 12-1 lists the different filtering modes.
Table 12-1 . Locale.FilteringMode Values
Mode
Description
Specifies filtering mode that is based on the given priority
list of languages.
AUTOSELECT_FILTERING
Specifies extended filtering.
EXTENDED_FILTERING
IGNORE_EXTENDED_RANGES
Specifies basic filtering.
Specifies basic filtering, and if any extended languages are
included in the language priority list, they are mapped to
the basic language range.
MAP_EXTENDED_RANGES
Specifies basic filtering, and if any extended languages are
included in the language priority list, the list is rejected and
IllegalArgumentException is thrown.
REJECT_EXTENDED_RANGES
12-5. Searching Unicode with Regular
Expressions
Problem
You want to find or match Unicode characters in a string. You want to do that using
regular expression syntax.
Solution 1
 
 
Search WWH ::




Custom Search