Package akka.http.impl.model
Class JavaQuery
- java.lang.Object
-
- akka.http.javadsl.model.Query
-
- akka.http.impl.model.JavaQuery
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
public final class JavaQuery extends Query implements scala.Product, java.io.Serializable
INTERNAL API- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract static R
apply(T1 v1)
java.util.Optional<java.lang.String>
get(java.lang.String key)
Returns the value of the first parameter with the given key if it exists.java.util.List<java.lang.String>
getAll(java.lang.String key)
Returns the value of all parameters with the given key.java.lang.String
getOrElse(java.lang.String key, java.lang.String _default)
Returns the value of the first parameter with the given key or the provided default value.Uri.Query
query()
java.lang.String
render(HttpCharset charset)
Renders this Query into its string representation using the given charset.java.lang.String
render(HttpCharset charset, akka.parboiled2.CharPredicate keep)
Renders this Query into its string representation using the given charset and char predicate.java.util.List<akka.japi.Pair<java.lang.String,java.lang.String>>
toList()
Returns a `List` of all parameters of this Query.java.util.Map<java.lang.String,java.lang.String>
toMap()
Returns a key/value map of the parameters of this Query.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
toMultiMap()
Returns a `Map` of all parameters of this Query.java.lang.String
toString()
Query
withParam(java.lang.String key, java.lang.String value)
Returns a copy of this instance with a query parameter added.-
Methods inherited from class akka.http.javadsl.model.Query
create, create, create, create, create, create
-
-
-
-
Constructor Detail
-
JavaQuery
public JavaQuery(Uri.Query query)
-
-
Method Detail
-
apply
public abstract static R apply(T1 v1)
-
query
public Uri.Query query()
-
get
public java.util.Optional<java.lang.String> get(java.lang.String key)
Description copied from class:Query
Returns the value of the first parameter with the given key if it exists.
-
toMap
public java.util.Map<java.lang.String,java.lang.String> toMap()
Description copied from class:Query
Returns a key/value map of the parameters of this Query. Use the `toList()` method to return all parameters if keys may occur multiple times.
-
toList
public java.util.List<akka.japi.Pair<java.lang.String,java.lang.String>> toList()
Description copied from class:Query
Returns a `List` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.
-
getOrElse
public java.lang.String getOrElse(java.lang.String key, java.lang.String _default)
Description copied from class:Query
Returns the value of the first parameter with the given key or the provided default value.
-
toMultiMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> toMultiMap()
Description copied from class:Query
Returns a `Map` of all parameters of this Query. Use the `toMap()` method to filter out entries with duplicated keys.- Specified by:
toMultiMap
in classQuery
-
getAll
public java.util.List<java.lang.String> getAll(java.lang.String key)
Description copied from class:Query
Returns the value of all parameters with the given key.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
withParam
public Query withParam(java.lang.String key, java.lang.String value)
Description copied from class:Query
Returns a copy of this instance with a query parameter added.
-
render
public java.lang.String render(HttpCharset charset)
Description copied from class:Query
Renders this Query into its string representation using the given charset.
-
render
public java.lang.String render(HttpCharset charset, akka.parboiled2.CharPredicate keep)
Description copied from class:Query
Renders this Query into its string representation using the given charset and char predicate.
-
-