public class URIParameters extends Object implements Parameters
Constructor and Description |
---|
URIParameters()
Creates a new instance.
|
URIParameters(Map<String,String[]> parameters)
Creates a new instance from the specified map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String name)
Indicates whether the parameters for the given name has a value.
|
String |
getValue(String name)
Returns the value for the specified parameter.
|
String[] |
getValues(String name)
Returns the values for the specified parameter.
|
boolean |
hasValue(String name)
Indicates whether the parameters for the given name has a value.
|
Set<String> |
names()
Returns the set of parameter names as an unmodifiable set.
|
void |
set(String name,
String value)
Set a parameter with only one value.
|
void |
set(String name,
String[] values)
Set a parameter with only multiple values.
|
public void set(String name, String value)
Parameters
set
in interface Parameters
name
- The name of the parameter.value
- The value.public void set(String name, String[] values)
Parameters
set
in interface Parameters
name
- The name of the parameter.values
- The values.public Set<String> names()
Parameters
names
in interface Parameters
public String getValue(String name)
Parameters
getValue
in interface Parameters
name
- The name of the parameter.null
if not specified.public String[] getValues(String name)
Parameters
getValues
in interface Parameters
name
- The name of the parameter.null
if not specified.public boolean exists(String name)
Parameters
exists
in interface Parameters
name
- The name of the parameter.true
if it has a value; false
otherwise.public boolean hasValue(String name)
Parameters
A parameter has a value if:
hasValue
in interface Parameters
name
- The name of the parameter.true
if it has a value;
false
otherwise.Copyright © 2016 Allette Systems. All rights reserved.