public class RequestParameters extends com.marklogic.client.impl.RequestParametersImplementation implements Map<String,List<String>>
RequestParameters supports a map with a string as the key and a list of strings as the value, which can represent parameters of an operation including parameters transported over HTTP.
| Constructor and Description |
|---|
RequestParameters()
Zero-argument constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
String... values)
Appends a list of values to the list for a parameter.
|
void |
add(String name,
String value)
Appends a value to the list for a parameter.
|
void |
clear()
Removes all parameters.
|
boolean |
containsKey(Object key)
Checks whether the parameter name has been specified.
|
boolean |
containsValue(Object value)
Checks whether any parameters have the value.
|
RequestParameters |
copy(String prefix)
Creates a copy of the parameters, prepending a namespace prefix to each parameter name.
|
Set<Map.Entry<String,List<String>>> |
entrySet()
Returns a set of parameter-list entries.
|
List<String> |
get(Object key)
Gets the values for a parameter name.
|
boolean |
isEmpty()
Returns whether or not any request parameters have been specified.
|
Set<String> |
keySet()
Returns the set of specified parameter names.
|
List<String> |
put(String key,
List<String> value)
Sets the values of a parameter name, returning the previous values if any.
|
void |
put(String name,
String... values)
Sets a parameter to a list of values.
|
void |
put(String name,
String value)
Set a parameter to a single value.
|
void |
putAll(Map<? extends String,? extends List<String>> m)
Adds existing parameter names and values.
|
List<String> |
remove(Object key)
Removes a parameter name, returning its values if any.
|
int |
size()
Returns the number of request parameters.
|
Collection<List<String>> |
values()
Returns a list of value lists.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic void put(String name, String value)
Set a parameter to a single value.
name - the parameter namevalue - the value of the parameterpublic void put(String name, String... values)
Sets a parameter to a list of values.
name - the parametervalues - the list of valuespublic void add(String name, String value)
Appends a value to the list for a parameter.
name - the parametervalue - the value to add to the listpublic void add(String name, String... values)
Appends a list of values to the list for a parameter.
name - the parametervalues - the values to add to the listpublic int size()
Returns the number of request parameters.
public boolean isEmpty()
Returns whether or not any request parameters have been specified.
public boolean containsKey(Object key)
Checks whether the parameter name has been specified.
containsKey in interface Map<String,List<String>>public boolean containsValue(Object value)
Checks whether any parameters have the value.
containsValue in interface Map<String,List<String>>public List<String> put(String key, List<String> value)
Sets the values of a parameter name, returning the previous values if any.
public List<String> remove(Object key)
Removes a parameter name, returning its values if any.
public void putAll(Map<? extends String,? extends List<String>> m)
Adds existing parameter names and values.
public void clear()
Removes all parameters.
public Collection<List<String>> values()
Returns a list of value lists.
public Set<Map.Entry<String,List<String>>> entrySet()
Returns a set of parameter-list entries.
public RequestParameters copy(String prefix)
Creates a copy of the parameters, prepending a namespace prefix to each parameter name.
prefix - the prefix to prependCopyright © 2013-2017 MarkLogic Corporation.