public static List<String> filterTags (List<LanguageRange> priorityList, Collection<String> tags, FilteringMode mode)

Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.

Parameters:
priorityList    user's Language Priority List in which each language tag is sorted in descending order based on priority or weight
tags    language tags
mode    filtering mode

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.

Exceptions:
NullPointerException    if priorityList or tags is null
IllegalArgumentException    if one or more extended language ranges are included in the given list when FilteringMode.REJECT_EXTENDED_RANGES is specified

Since:  1.8