Enum LanguageMatchPrecision
- All Implemented Interfaces:
Serializable, Comparable<LanguageMatchPrecision>
How precisely a variant's language matched an entry in the
Accept-Language header.
Ordinal order reflects match quality: WILDCARD (worst) through EXACT_COUNTRY (best).
- Author:
- James R. Perkins
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBase language matched but country presence differs (e.g. variantenmatched requesten-US).Exact match with no country on either side (e.g. variantdematched requestde).Exact match including country (e.g. varianten-GBmatched requesten-GB).Matched only via the wildcard (*) entry. -
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageMatchPrecisionReturns the enum constant of this type with the specified name.static LanguageMatchPrecision[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WILDCARD
Matched only via the wildcard (*) entry. -
BASE_LANGUAGE
Base language matched but country presence differs (e.g. variantenmatched requesten-US). -
EXACT
Exact match with no country on either side (e.g. variantdematched requestde). -
EXACT_COUNTRY
Exact match including country (e.g. varianten-GBmatched requesten-GB).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-