public abstract class MediaRange extends MediaRange implements Renderable, WithQValue<MediaRange>
Modifier and Type | Class and Description |
---|---|
static class |
MediaRange.One |
static class |
MediaRange.One$ |
Constructor and Description |
---|
MediaRange() |
Modifier and Type | Method and Description |
---|---|
static MediaRange |
apply(MediaType mediaType) |
static MediaRange |
apply(MediaType mediaType,
float qValue) |
static MediaRange |
custom(java.lang.String mainType,
scala.collection.immutable.Map<java.lang.String,java.lang.String> params,
float qValue) |
java.util.Map<java.lang.String,java.lang.String> |
getParams()
Java API
|
boolean |
isApplication() |
boolean |
isAudio() |
boolean |
isImage() |
boolean |
isMessage() |
boolean |
isMultipart() |
boolean |
isText() |
boolean |
isVideo() |
boolean |
isWildcard() |
abstract java.lang.String |
mainType()
Returns the main-type this media-range matches.
|
abstract boolean |
matches(MediaType mediaType) |
boolean |
matches(MediaType mediaType)
Java API
|
abstract scala.collection.immutable.Map<java.lang.String,java.lang.String> |
params() |
abstract float |
qValue()
Returns the qValue of this media-range.
|
static scala.Tuple2<scala.collection.immutable.Map<java.lang.String,java.lang.String>,java.lang.Object> |
splitOffQValue(scala.collection.immutable.Map<java.lang.String,java.lang.String> params,
float defaultQ) |
abstract java.lang.String |
value() |
ContentTypeRange |
withCharsetRange(HttpCharsetRange charsetRange)
Constructs a
ContentTypeRange from this instance and the given charset. |
abstract MediaRange |
withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
Returns a copy of this instance with the params replaced by the given ones.
|
withQValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
render
withQValue, withQValue
public static scala.Tuple2<scala.collection.immutable.Map<java.lang.String,java.lang.String>,java.lang.Object> splitOffQValue(scala.collection.immutable.Map<java.lang.String,java.lang.String> params, float defaultQ)
public static MediaRange custom(java.lang.String mainType, scala.collection.immutable.Map<java.lang.String,java.lang.String> params, float qValue)
public static MediaRange apply(MediaType mediaType)
public static MediaRange apply(MediaType mediaType, float qValue)
public abstract java.lang.String value()
public abstract java.lang.String mainType()
MediaRange
mainType
in class MediaRange
public abstract scala.collection.immutable.Map<java.lang.String,java.lang.String> params()
public abstract float qValue()
MediaRange
qValue
in class MediaRange
public abstract boolean matches(MediaType mediaType)
public boolean isApplication()
public boolean isAudio()
public boolean isImage()
public boolean isMessage()
public boolean isMultipart()
public boolean isText()
public boolean isVideo()
public boolean isWildcard()
public abstract MediaRange withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
qValue
member is (also) updated.params
- (undocumented)public ContentTypeRange withCharsetRange(HttpCharsetRange charsetRange)
ContentTypeRange
from this instance and the given charset.charsetRange
- (undocumented)public java.util.Map<java.lang.String,java.lang.String> getParams()
getParams
in class MediaRange
public boolean matches(MediaType mediaType)
matches
in class MediaRange