public class ParsableHeaderValue extends Object implements ParsedHeaderValue
| Modifier and Type | Field and Description |
|---|---|
protected String |
value |
DEFAULT_WEIGHT| Constructor and Description |
|---|
ParsableHeaderValue(String headerContent) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureHeaderProcessed() |
boolean |
equals(Object obj) |
<T extends ParsedHeaderValue> |
findMatchedBy(Collection<T> matchTries)
Finds the first ParsedHeaderValue in the list that matches with this header value.
|
ParsableHeaderValue |
forceParse() |
int |
hashCode() |
boolean |
isMatchedBy(ParsedHeaderValue matchTry)
Test if this header is matched by matchTry header
|
protected boolean |
isMatchedBy2(ParsableHeaderValue matchTry) |
boolean |
isPermitted()
Is this an allowed operation as specified by the corresponding header?
|
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 agent
|
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 rfc7231 |
int |
weightedOrder()
An integer that represents the absolute order position of this header
|
protected int |
weightedOrderPart2() |
protected String value
public ParsableHeaderValue(String headerContent)
public String rawValue()
ParsedHeaderValuerawValue in interface ParsedHeaderValuepublic String value()
ParsedHeaderValuevalue in interface ParsedHeaderValuepublic float weight()
ParsedHeaderValueweight in interface ParsedHeaderValuepublic boolean isPermitted()
ParsedHeaderValueisPermitted in interface ParsedHeaderValuepublic String parameter(String key)
ParsedHeaderValueq parameter is never present.parameter in interface ParsedHeaderValuepublic Map<String,String> parameters()
ParsedHeaderValueq parameter is never present.parameters in interface ParsedHeaderValue#parameter(String)}public final boolean isMatchedBy(ParsedHeaderValue matchTry)
ParsedHeaderValueisMatchedBy in interface ParsedHeaderValuematchTry - The header to be matched fromprotected boolean isMatchedBy2(ParsableHeaderValue matchTry)
public <T extends ParsedHeaderValue> T findMatchedBy(Collection<T> matchTries)
ParsedHeaderValuefindMatchedBy in interface ParsedHeaderValuematchTries - A list of parsed headers to match from this header valueprotected void ensureHeaderProcessed()
public ParsableHeaderValue forceParse()
public final int weightedOrder()
ParsedHeaderValueweightedOrder in interface ParsedHeaderValueprotected int weightedOrderPart2()
Copyright © 2020. All rights reserved.