Class LanguageHeader

java.lang.Object
io.vertx.mutiny.ext.web.LanguageHeader
All Implemented Interfaces:
MutinyDelegate, ParsedHeaderValue

public class LanguageHeader extends Object implements ParsedHeaderValue, MutinyDelegate
A parsed language header. Delivers a more direct access to the individual elements of the header it represents

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

See Also:
  • LanguageHeader
  • Field Details

  • Constructor Details

    • LanguageHeader

      public LanguageHeader(io.vertx.ext.web.LanguageHeader delegate)
      Create a new instance of LanguageHeader delegating to the given (non-null) instance of LanguageHeader.
    • LanguageHeader

      public LanguageHeader(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.LanguageHeader getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Specified by:
      getDelegate in interface ParsedHeaderValue
      Returns:
      the delegate instance
    • tag

      public String tag()
      The tag of the language as specified by rfc7231#section-3.1.3.1.
      Equivalent to subtag(0)
      Returns:
      The language tag
    • subtag

      public String subtag()
      The subtag of the language as specified by rfc7231#section-3.1.3.1.
      Equivalent to subtag(1)
      Returns:
      The language subtag. Can be null.
    • subtag

      public String subtag(int level)
      A subtag of this language header.
      + info: rfc7231#section-3.1.3.1
      Returns:
      The language subtag at specified position. Can be null.
    • subtagCount

      public int subtagCount()
      Returns:
      the number of subtags this value has
    • value

      public String value()
      Holds the unparsed value of the header.
      For the most part, this is the content before the semi-colon (";")
      Specified by:
      value in interface ParsedHeaderValue
    • parameter

      public String parameter(String arg0)
      The value of the parameter specified by this key. Each is one of 3 things:
      1. null <- That key was not specified
      2. ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
      3. [Other] <- The value of the parameter
      Note: The q parameter is never present.
      Specified by:
      parameter in interface ParsedHeaderValue
      Returns:
      . Can be null.
    • weightedOrder

      public int weightedOrder()
      An integer that represents the absolute order position of this header
      Specified by:
      weightedOrder in interface ParsedHeaderValue
    • isMatchedBy

      public boolean isMatchedBy(ParsedHeaderValue arg0)
      Test if this header is matched by matchTry header
      Specified by:
      isMatchedBy in interface ParsedHeaderValue
      Parameters:
      matchTry - The header to be matched from
      Returns:
      true if this header represents a subset of matchTry, otherwise, false
    • parameters

      public Map<String,String> parameters()
      The parameters specified in this header value. Note: The q parameter is never present.
      Specified by:
      parameters in interface ParsedHeaderValue
      Returns:
      Unmodifiable Map of parameters of this header value
    • weight

      public float weight()
      Holds the weight specified in the "q" parameter of the header.
      If the parameter is not specified, 1.0 is assumed according to rfc7231
      Specified by:
      weight in interface ParsedHeaderValue
      Returns:
    • isPermitted

      public boolean isPermitted()
      Is this an allowed operation as specified by the corresponding header?
      Specified by:
      isPermitted in interface ParsedHeaderValue
      Returns:
    • rawValue

      public String rawValue()
      Contains the raw value that was received from the user agent
      Specified by:
      rawValue in interface ParsedHeaderValue
    • newInstance

      public static LanguageHeader newInstance(io.vertx.ext.web.LanguageHeader delegate)
      Creates a new instance of the LanguageHeader.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object