public abstract class Query
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Query |
EMPTY
Returns an empty Query.
|
Constructor and Description |
---|
Query() |
Modifier and Type | Method and Description |
---|---|
static Query |
create(java.lang.Iterable<org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>> params)
Returns a Query from the given parameters.
|
static Query |
create(java.util.Map<java.lang.String,java.lang.String> params)
Returns a Query from the given parameters.
|
static Query |
create(org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>... params)
Returns a Query from the given parameters.
|
static Query |
create(java.lang.String rawQuery)
Returns a Query created by parsing the given undecoded string representation.
|
static Query |
create(java.lang.String rawQuery,
java.nio.charset.Charset charset,
Uri.ParsingMode parsingMode)
Returns a Query created by parsing the given undecoded string representation with the provided
charset and parsing mode.
|
static Query |
create(java.lang.String rawQuery,
Uri.ParsingMode parsingMode)
Returns a Query created by parsing the given undecoded string representation with the provided
parsing mode.
|
abstract 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.
|
abstract java.util.List<java.lang.String> |
getAll(java.lang.String key)
Returns the value of all parameters with the given key.
|
abstract 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.
|
abstract java.lang.String |
render(HttpCharset charset)
Renders this Query into its string representation using the given charset.
|
abstract java.lang.String |
render(HttpCharset charset,
org.parboiled2.CharPredicate keep)
Renders this Query into its string representation using the given charset and char predicate.
|
abstract java.util.List<org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>> |
toList()
Returns a `List` of all parameters of this Query.
|
abstract java.util.Map<java.lang.String,java.lang.String> |
toMap()
Returns a key/value map of the parameters of this Query.
|
abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
toMultiMap()
Returns a `Map` of all parameters of this Query.
|
abstract Query |
withParam(java.lang.String key,
java.lang.String value)
Returns a copy of this instance with a query parameter added.
|
public static final Query EMPTY
public abstract java.util.Optional<java.lang.String> get(java.lang.String key)
public abstract java.lang.String getOrElse(java.lang.String key, java.lang.String _default)
public abstract java.util.List<java.lang.String> getAll(java.lang.String key)
public abstract java.util.List<org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>> toList()
public abstract java.util.Map<java.lang.String,java.lang.String> toMap()
public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> toMultiMap()
public abstract Query withParam(java.lang.String key, java.lang.String value)
public abstract java.lang.String render(HttpCharset charset)
public abstract java.lang.String render(HttpCharset charset, org.parboiled2.CharPredicate keep)
public static Query create(java.lang.String rawQuery)
public static Query create(java.lang.String rawQuery, Uri.ParsingMode parsingMode)
public static Query create(java.lang.String rawQuery, java.nio.charset.Charset charset, Uri.ParsingMode parsingMode)
@SafeVarargs public static Query create(org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>... params)
public static Query create(java.lang.Iterable<org.apache.pekko.japi.Pair<java.lang.String,java.lang.String>> params)
public static Query create(java.util.Map<java.lang.String,java.lang.String> params)