Class LanguageHeader
java.lang.Object
io.vertx.reactivex.ext.web.LanguageHeader
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, ParsedHeaderValue
public class LanguageHeader
extends Object
implements io.vertx.lang.rx.RxDelegate, ParsedHeaderValue
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 RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<LanguageHeader> static final floatIf no "q" parameter is present, the default weight is 1.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisMatchedBy(ParsedHeaderValue matchTry) Test if this header is matched by matchTry headerbooleanIs this an allowed operation as specified by the corresponding header?static LanguageHeaderThe value of the parameter specified by this key.The parameters specified in this header value.rawValue()Contains the raw value that was received from the user agentsubtag()The subtag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent tosubtag(int level) A subtag of this language header.
+ info: rfc7231#section-3.1.3.1inttag()The tag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent totoString()value()Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")floatweight()Holds the weight specified in the "q" parameter of the header.
If the parameter is not specified, 1.0 is assumed according to rfc7231intAn integer that represents the absolute order position of this header
-
Field Details
-
__TYPE_ARG
-
DEFAULT_WEIGHT
public static final float DEFAULT_WEIGHTIf no "q" parameter is present, the default weight is 1.
- See Also:
-
-
Constructor Details
-
LanguageHeader
-
LanguageHeader
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceParsedHeaderValue- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
rawValue
Contains the raw value that was received from the user agent- Specified by:
rawValuein interfaceParsedHeaderValue- Returns:
-
value
Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")- Specified by:
valuein interfaceParsedHeaderValue- Returns:
-
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:
weightin interfaceParsedHeaderValue- Returns:
-
parameter
The value of the parameter specified by this key. Each is one of 3 things:- null <- That key was not specified
- ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
- [Other] invalid input: '<'- The value of the parameter
qparameter is never present.- Specified by:
parameterin interfaceParsedHeaderValue- Parameters:
key-- Returns:
-
parameters
The parameters specified in this header value. Note: Theqparameter is never present.- Specified by:
parametersin interfaceParsedHeaderValue- Returns:
- Unmodifiable Map of parameters of this header value
-
isPermitted
public boolean isPermitted()Is this an allowed operation as specified by the corresponding header?- Specified by:
isPermittedin interfaceParsedHeaderValue- Returns:
-
isMatchedBy
Test if this header is matched by matchTry header- Specified by:
isMatchedByin interfaceParsedHeaderValue- Parameters:
matchTry- The header to be matched from- Returns:
- true if this header represents a subset of matchTry, otherwise, false
-
weightedOrder
public int weightedOrder()An integer that represents the absolute order position of this header- Specified by:
weightedOrderin interfaceParsedHeaderValue- Returns:
-
tag
The tag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent to- Returns:
- The language tag
-
subtag
The subtag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent to- Returns:
- The language subtag
-
subtag
A subtag of this language header.
+ info: rfc7231#section-3.1.3.1- Parameters:
level-- Returns:
- The language subtag at specified position
-
subtagCount
public int subtagCount()- Returns:
- the number of subtags this value has
-
newInstance
-