Package akka.http.scaladsl.model
Class MediaRange.One
- java.lang.Object
-
- akka.http.javadsl.model.MediaRange
-
- akka.http.scaladsl.model.MediaRange
-
- akka.http.scaladsl.model.MediaRange.One
-
- All Implemented Interfaces:
Renderable
,ToStringRenderable
,ValueRenderable
,WithQValue<MediaRange>
,java.io.Serializable
,scala.Equals
,scala.Product
- Enclosing class:
- MediaRange
public static final class MediaRange.One extends MediaRange implements ValueRenderable, scala.Product, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.http.scaladsl.model.MediaRange
MediaRange.One, MediaRange.One$
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isApplication()
boolean
isAudio()
boolean
isImage()
boolean
isMessage()
boolean
isMultipart()
boolean
isText()
boolean
isVideo()
java.lang.String
mainType()
Returns the main-type this media-range matches.boolean
matches(MediaType mediaType)
MediaType
mediaType()
scala.collection.immutable.Map<java.lang.String,java.lang.String>
params()
float
qValue()
Returns the qValue of this media-range.<R extends Rendering>
Renderingrender(R r)
MediaRange.One
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.MediaRange.One
withQValue(float qValue)
Returns a copy of this instance with a changed qValue.-
Methods inherited from class akka.http.scaladsl.model.MediaRange
apply, apply, custom, getParams, isWildcard, matches, splitOffQValue, value, withCharsetRange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Methods inherited from interface akka.http.impl.util.ToStringRenderable
toString
-
Methods inherited from interface akka.http.impl.util.ValueRenderable
value
-
Methods inherited from interface akka.http.scaladsl.model.WithQValue
withQValue
-
-
-
-
Constructor Detail
-
One
public One(MediaType mediaType, float qValue)
-
-
Method Detail
-
mediaType
public MediaType mediaType()
-
qValue
public float qValue()
Description copied from class:MediaRange
Returns the qValue of this media-range.- Specified by:
qValue
in classMediaRange
-
mainType
public java.lang.String mainType()
Description copied from class:MediaRange
Returns the main-type this media-range matches.- Specified by:
mainType
in classMediaRange
-
params
public scala.collection.immutable.Map<java.lang.String,java.lang.String> params()
- Specified by:
params
in classMediaRange
-
isApplication
public boolean isApplication()
- Overrides:
isApplication
in classMediaRange
-
isAudio
public boolean isAudio()
- Overrides:
isAudio
in classMediaRange
-
isImage
public boolean isImage()
- Overrides:
isImage
in classMediaRange
-
isMessage
public boolean isMessage()
- Overrides:
isMessage
in classMediaRange
-
isMultipart
public boolean isMultipart()
- Overrides:
isMultipart
in classMediaRange
-
isText
public boolean isText()
- Overrides:
isText
in classMediaRange
-
isVideo
public boolean isVideo()
- Overrides:
isVideo
in classMediaRange
-
matches
public boolean matches(MediaType mediaType)
- Specified by:
matches
in classMediaRange
-
withParams
public MediaRange.One withParams(scala.collection.immutable.Map<java.lang.String,java.lang.String> params)
Description copied from class:MediaRange
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.- Specified by:
withParams
in classMediaRange
- Parameters:
params
- (undocumented)- Returns:
- (undocumented)
-
withQValue
public MediaRange.One withQValue(float qValue)
Description copied from class:MediaRange
Returns a copy of this instance with a changed qValue.- Specified by:
withQValue
in interfaceWithQValue<MediaRange>
- Specified by:
withQValue
in classMediaRange
-
render
public <R extends Rendering> Rendering render(R r)
- Specified by:
render
in interfaceRenderable
-
-