Class MediaRange
java.lang.Object
org.apache.pekko.http.javadsl.model.MediaRange
org.apache.pekko.http.scaladsl.model.MediaRange
- All Implemented Interfaces:
- Renderable,- WithQValue<MediaRange>
- Direct Known Subclasses:
- MediaRange.One,- MediaRanges.PredefinedMediaRange
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic MediaRangestatic MediaRangestatic MediaRangeJava APIbooleanbooleanisAudio()booleanisImage()booleanbooleanbooleanisText()booleanisVideo()booleanabstract StringmainType()Returns the main-type this media-range matches.booleanJava APIabstract booleanparams()abstract floatqValue()Returns the qValue of this media-range.splitOffQValue(scala.collection.immutable.Map<String, String> params, float defaultQ) abstract Stringvalue()withCharsetRange(HttpCharsetRange charsetRange) Constructs aContentTypeRangefrom this instance and the given charset.abstract MediaRangewithParams(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 org.apache.pekko.http.javadsl.model.MediaRangewithQValueMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.impl.util.RenderablerenderMethods inherited from interface org.apache.pekko.http.scaladsl.model.WithQValuewithQValue, withQValue
- 
Constructor Details- 
MediaRangepublic MediaRange()
 
- 
- 
Method Details- 
splitOffQValue
- 
custompublic static MediaRange custom(String mainType, scala.collection.immutable.Map<String, String> params, float qValue) 
- 
apply
- 
apply
- 
value
- 
mainTypeDescription copied from class:MediaRangeReturns the main-type this media-range matches.- Specified by:
- mainTypein class- MediaRange
 
- 
params
- 
qValuepublic abstract float qValue()Description copied from class:MediaRangeReturns the qValue of this media-range.- Specified by:
- qValuein class- MediaRange
 
- 
matches
- 
isApplicationpublic boolean isApplication()
- 
isAudiopublic boolean isAudio()
- 
isImagepublic boolean isImage()
- 
isMessagepublic boolean isMessage()
- 
isMultipartpublic boolean isMultipart()
- 
isTextpublic boolean isText()
- 
isVideopublic boolean isVideo()
- 
isWildcardpublic boolean isWildcard()
- 
withParamsReturns a copy of this instance with the params replaced by the given ones. If the given map contains a "q" value theqValuemember is (also) updated.- Parameters:
- params- (undocumented)
- Returns:
- (undocumented)
 
- 
withCharsetRangeConstructs aContentTypeRangefrom this instance and the given charset.- Parameters:
- charsetRange- (undocumented)
- Returns:
- (undocumented)
 
- 
getParamsJava API- Specified by:
- getParamsin class- MediaRange
 
- 
matchesJava API- Specified by:
- matchesin class- MediaRange
 
 
-