Package org.apache.juneau
Class MediaRange
java.lang.Object
org.apache.juneau.MediaType
org.apache.juneau.MediaRange
- All Implemented Interfaces:
- Comparable<MediaType>
Describes a single type used in content negotiation between an HTTP client and server, as described in
 Section 14.1 and 14.7 of RFC2616 (the HTTP/1.1 specification).
 
See Also:
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionforEachExtension(Consumer<NameValuePair> action) Performs an action on the optional set of custom extensions defined for this type.Returns the optional set of custom extensions defined for this type.Returns the'q' (quality) value for this type, as described in Section 3.9 of RFC2616.toString()Methods inherited from class org.apache.juneau.MediaTypecompareTo, equals, forEachParameter, forEachSubType, getParameter, getParameters, getSubType, getSubTypes, getType, hashCode, hasSubType, isMetaSubtype, match, match, of, of, ofAll
- 
Constructor Details- 
MediaRangeConstructor.- Parameters:
- e- The parsed media range element.
 
 
- 
- 
Method Details- 
getQValueReturns the'q' (quality) value for this type, as described in Section 3.9 of RFC2616.The quality value is a float between 0.0 (unacceptable) and1.0 (most acceptable).If 'q' value doesn't make sense for the context (e.g. this range was extracted from a "content-*" header, as opposed to"accept-*" header, its value will always be"1" .- Returns:
- The 'q' value for this type, never null .
 
- 
getExtensionsReturns the optional set of custom extensions defined for this type.Values are lowercase and never null .- Returns:
- The optional list of extensions, never null .
 
- 
forEachExtensionPerforms an action on the optional set of custom extensions defined for this type.Values are lowercase and never null .- Parameters:
- action- The action to perform.
- Returns:
- This object.
 
- 
toString
 
-