Uses of Class java.util.Locale.LanguageRange (Java Platform SE 8 )
Date: 2026-04-17

## Uses of Class
java.util.Locale.LanguageRange

- Packages that use Locale.LanguageRange
  Package | Description
  --- | ---
  java.util | Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

- - ### Uses of Locale.LanguageRange in java.util

    Methods in java.util that return types with arguments of type Locale.LanguageRange
    Modifier and Type | Method and Description
    --- | ---
    `static List<Locale.LanguageRange>` | Locale.LanguageRange.`mapEquivalents(List<Locale.LanguageRange> priorityList, Map<String,List<String>> map)` Generates a new customized Language Priority List using the given `priorityList` and `map`.
    `static List<Locale.LanguageRange>` | Locale.LanguageRange.`parse(String ranges)` Parses the given `ranges` to generate a Language Priority List.
    `static List<Locale.LanguageRange>` | Locale.LanguageRange.`parse(String ranges, Map<String,List<String>> map)` Parses the given `ranges` to generate a Language Priority List, and then customizes the list using the given `map`.

    Method parameters in java.util with type arguments of type Locale.LanguageRange
    Modifier and Type | Method and Description
    --- | ---
    `static List<Locale>` | Locale.`filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)` Returns a list of matching `Locale` instances using the filtering mechanism defined in RFC 4647.
    `static List<Locale>` | Locale.`filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales, Locale.FilteringMode mode)` Returns a list of matching `Locale` instances using the filtering mechanism defined in RFC 4647.
    `static List<String>` | Locale.`filterTags(List<Locale.LanguageRange> priorityList, Collection<String> tags)` Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.
    `static List<String>` | Locale.`filterTags(List<Locale.LanguageRange> priorityList, Collection<String> tags, Locale.FilteringMode mode)` Returns a list of matching languages tags using the basic filtering mechanism defined in RFC 4647.
    `static Locale` | Locale.`lookup(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)` Returns a `Locale` instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.
    `static String` | Locale.`lookupTag(List<Locale.LanguageRange> priorityList, Collection<String> tags)` Returns the best-matching language tag using the lookup mechanism defined in RFC 4647.
    `static List<Locale.LanguageRange>` | Locale.LanguageRange.`mapEquivalents(List<Locale.LanguageRange> priorityList, Map<String,List<String>> map)` Generates a new customized Language Priority List using the given `priorityList` and `map`.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.