public class MockRequestParameters extends Object implements IWritableRequestParameters
IRequestParameters
.Constructor and Description |
---|
MockRequestParameters() |
Modifier and Type | Method and Description |
---|---|
void |
addParameterValue(String name,
String value)
Adds value for given key.
|
Set<String> |
getParameterNames()
Returns immutable set of all available parameter names.
|
StringValue |
getParameterValue(String name)
Returns single value for parameter with specified name.
|
List<StringValue> |
getParameterValues(String name)
Returns list of values for parameter with specified name.
|
void |
reset()
Clears all parameters.
|
void |
setParameterValue(String name,
String value)
Sets value for given key.
|
void |
setParameterValues(String name,
List<StringValue> values)
Sets the values for given parameter.
|
public Set<String> getParameterNames()
IRequestParameters
getParameterNames
in interface IRequestParameters
public StringValue getParameterValue(String name)
IRequestParameters
getParameterValue
in interface IRequestParameters
name
- parameter nameStringValue
wrapping the actual valueStringValue.isNull()
public List<StringValue> getParameterValues(String name)
IRequestParameters
null
getParameterValues
in interface IRequestParameters
name
- parameter namenull
if parameter does not
existpublic void setParameterValues(String name, List<StringValue> values)
IWritableRequestParameters
setParameterValues
in interface IWritableRequestParameters
public void setParameterValue(String name, String value)
name
- value
- public void addParameterValue(String name, String value)
name
- value
- public void reset()
IWritableRequestParameters
reset
in interface IWritableRequestParameters
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.