Package akka.http.scaladsl.model
Class MediaRange
java.lang.Object
akka.http.javadsl.model.MediaRange
akka.http.scaladsl.model.MediaRange
- All Implemented Interfaces:
Renderable
,WithQValue<MediaRange>
- Direct Known Subclasses:
MediaRange.One
,MediaRanges.PredefinedMediaRange
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaRange
static MediaRange
static MediaRange
Java APIboolean
boolean
isAudio()
boolean
isImage()
boolean
boolean
boolean
isText()
boolean
isVideo()
boolean
abstract String
mainType()
Returns the main-type this media-range matches.boolean
Java APIabstract boolean
params()
abstract float
qValue()
Returns the qValue of this media-range.splitOffQValue
(scala.collection.immutable.Map<String, String> params, float defaultQ) abstract String
value()
withCharsetRange
(HttpCharsetRange charsetRange) Constructs aContentTypeRange
from this instance and the given charset.abstract MediaRange
withParams
(scala.collection.immutable.Map<String, String> params) Returns a copy of this instance with the params replaced by the given ones.Methods inherited from class akka.http.javadsl.model.MediaRange
withQValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface akka.http.impl.util.Renderable
render
Methods inherited from interface akka.http.scaladsl.model.WithQValue
withQValue, withQValue
-
Constructor Details
-
MediaRange
public MediaRange()
-
-
Method Details
-
splitOffQValue
-
custom
public static MediaRange custom(String mainType, scala.collection.immutable.Map<String, String> params, float qValue) -
apply
-
apply
-
value
-
mainType
Description copied from class:MediaRange
Returns the main-type this media-range matches.- Specified by:
mainType
in classMediaRange
-
params
-
qValue
public abstract float qValue()Description copied from class:MediaRange
Returns the qValue of this media-range.- Specified by:
qValue
in classMediaRange
-
matches
-
isApplication
public boolean isApplication() -
isAudio
public boolean isAudio() -
isImage
public boolean isImage() -
isMessage
public boolean isMessage() -
isMultipart
public boolean isMultipart() -
isText
public boolean isText() -
isVideo
public boolean isVideo() -
isWildcard
public boolean isWildcard() -
withParams
Returns a copy of this instance with the params replaced by the given ones. If the given map contains a "q" value theqValue
member is (also) updated.- Parameters:
params
- (undocumented)- Returns:
- (undocumented)
-
withCharsetRange
Constructs aContentTypeRange
from this instance and the given charset.- Parameters:
charsetRange
- (undocumented)- Returns:
- (undocumented)
-
getParams
Java API- Specified by:
getParams
in classMediaRange
-
matches
Java API- Specified by:
matches
in classMediaRange
-