Enum LanguageMatchPrecision

java.lang.Object
java.lang.Enum<LanguageMatchPrecision>
org.jboss.resteasy.core.request.LanguageMatchPrecision
All Implemented Interfaces:
Serializable, Comparable<LanguageMatchPrecision>

public enum LanguageMatchPrecision extends Enum<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 Details

    • WILDCARD

      public static final LanguageMatchPrecision WILDCARD
      Matched only via the wildcard (*) entry.
    • BASE_LANGUAGE

      public static final LanguageMatchPrecision BASE_LANGUAGE
      Base language matched but country presence differs (e.g. variant en matched request en-US).
    • EXACT

      public static final LanguageMatchPrecision EXACT
      Exact match with no country on either side (e.g. variant de matched request de).
    • EXACT_COUNTRY

      public static final LanguageMatchPrecision EXACT_COUNTRY
      Exact match including country (e.g. variant en-GB matched request en-GB).
  • Method Details

    • values

      public static LanguageMatchPrecision[] 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

      public static LanguageMatchPrecision valueOf(String name)
      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 name
      NullPointerException - if the argument is null