Package io.vertx.reactivex.ext.web
Class LanguageHeader
- java.lang.Object
-
- io.vertx.reactivex.ext.web.LanguageHeader
-
- All Implemented Interfaces:
ParsedHeaderValue
public class LanguageHeader extends Object implements ParsedHeaderValue
A parsed language header. Delivers a more direct access to the individual elements of the header it representsNOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<LanguageHeader>
__TYPE_ARG
static float
DEFAULT_WEIGHT
If no "q" parameter is present, the default weight is 1.
-
Constructor Summary
Constructors Constructor Description LanguageHeader(LanguageHeader delegate)
LanguageHeader(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
LanguageHeader
getDelegate()
int
hashCode()
boolean
isMatchedBy(ParsedHeaderValue matchTry)
Test if this header is matched by matchTry headerboolean
isPermitted()
Is this an allowed operation as specified by the corresponding header?static LanguageHeader
newInstance(LanguageHeader arg)
String
parameter(String key)
The value of the parameter specified by this key.Map<String,String>
parameters()
The parameters specified in this header value.String
rawValue()
Contains the raw value that was received from the user agentString
subtag()
The subtag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent toString
subtag(int level)
A subtag of this language header.
+ info: rfc7231#section-3.1.3.1int
subtagCount()
String
tag()
The tag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent toString
toString()
String
value()
Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")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 rfc7231int
weightedOrder()
An integer that represents the absolute order position of this header
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<LanguageHeader> __TYPE_ARG
-
DEFAULT_WEIGHT
public static final float DEFAULT_WEIGHT
If no "q" parameter is present, the default weight is 1.
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LanguageHeader
public LanguageHeader(LanguageHeader delegate)
-
LanguageHeader
public LanguageHeader(Object delegate)
-
-
Method Detail
-
getDelegate
public LanguageHeader getDelegate()
- Specified by:
getDelegate
in interfaceParsedHeaderValue
-
rawValue
public String rawValue()
Contains the raw value that was received from the user agent- Specified by:
rawValue
in interfaceParsedHeaderValue
- Returns:
-
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 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:
weight
in interfaceParsedHeaderValue
- Returns:
-
parameter
public String parameter(String key)
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] <- The value of the parameter
q
parameter is never present.- Specified by:
parameter
in interfaceParsedHeaderValue
- Parameters:
key
-- Returns:
-
parameters
public Map<String,String> parameters()
The parameters specified in this header value. Note: Theq
parameter is never present.- Specified by:
parameters
in 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:
isPermitted
in interfaceParsedHeaderValue
- Returns:
-
isMatchedBy
public boolean isMatchedBy(ParsedHeaderValue matchTry)
Test if this header is matched by matchTry header- Specified by:
isMatchedBy
in 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:
weightedOrder
in interfaceParsedHeaderValue
- Returns:
-
tag
public String tag()
The tag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent to- Returns:
- The language tag
-
subtag
public String subtag()
The subtag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent to- Returns:
- The language subtag
-
subtag
public String subtag(int level)
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
public static LanguageHeader newInstance(LanguageHeader arg)
-
-