public class QueryParameters extends Object implements Serializable
Constructor and Description |
---|
QueryParameters(Map<String,List<String>> parameters)
Creates query parameters from parameter map.
|
Modifier and Type | Method and Description |
---|---|
static QueryParameters |
empty()
Creates an empty query parameters information.
|
static QueryParameters |
full(Map<String,String[]> parameters)
Creates parameters from full representation, where each parameter name
may correspond to multiple values.
|
Map<String,List<String>> |
getParameters()
Returns query parameters information with support for multiple values
corresponding to single parameter name.
|
String |
getQueryString()
Turns query parameters into query string that contains all parameter
names and their values.
|
static QueryParameters |
simple(Map<String,String> parameters)
Creates parameters from simple representation, where each parameter name
corresponds to a single value.
|
public static QueryParameters empty()
public static QueryParameters full(Map<String,String[]> parameters)
parameters
- query parameters mappublic static QueryParameters simple(Map<String,String> parameters)
parameters
- query parameters mappublic Map<String,List<String>> getParameters()
Example: https://example.com/?one=1&two=2&one=3
will result in
the corresponding map: {"one" : [1, 3], "two": [2]}
public String getQueryString()
Copyright © 2019. All rights reserved.