- All Implemented Interfaces:
Writable
,MutableURIParameters
,URIParameters
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionCreates an empty set of parameters.URIParametersMap
(String queryString) Parses the provided URL-Encoded parameter string. -
Method Summary
Modifier and TypeMethodDescriptionAdds a parameter with multiple values.Adds a parameter with a single value.Adds a parameter with multiple values.final URIParametersMap
Adds a parameter with a single value.getParameter
(String name) Gets the value for the provided parameter name ornull
if doesn't exist.Gets an unmodifiable map view of all parameters.Gets an unmodifiable iterator of the parameter names.getParameterValues
(String name) Gets an unmodifiable view of all values for a multi-value parameter ornull
if has no values.boolean
static URIParametersMap
of()
static URIParametersMap
static URIParametersMap
static URIParametersMap
static URIParametersMap
of
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) static URIParametersMap
of
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5) static URIParametersMap
static URIParametersMap
static URIParametersMap
static URIParametersMap
of
(String name1, String value1, String name2, String value2, String name3, String value3, String name4, String value4) static URIParametersMap
of
(String name1, String value1, String name2, String value2, String name3, String value3, String name4, String value4, String name5, String value5) toString()
Gets the query string encoded in the default encodingIRI.ENCODING
, not including the '?'Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aoapps.net.MutableURIParameters
addParameter, addParameters
-
Constructor Details
-
URIParametersMap
public URIParametersMap()Creates an empty set of parameters. -
URIParametersMap
Parses the provided URL-Encoded parameter string.- Parameters:
queryString
- The URL-encoded parameter string ornull
or""
for none
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
toString
Gets the query string encoded in the default encodingIRI.ENCODING
, not including the '?' prefix. -
getParameter
Description copied from interface:URIParameters
Gets the value for the provided parameter name ornull
if doesn't exist. If the parameter has multiple values, the first value is returned.- Specified by:
getParameter
in interfaceURIParameters
-
getParameterNames
Description copied from interface:URIParameters
Gets an unmodifiable iterator of the parameter names.- Specified by:
getParameterNames
in interfaceURIParameters
-
getParameterValues
Description copied from interface:URIParameters
Gets an unmodifiable view of all values for a multi-value parameter ornull
if has no values.- Specified by:
getParameterValues
in interfaceURIParameters
-
getParameterMap
Description copied from interface:URIParameters
Gets an unmodifiable map view of all parameters.- Specified by:
getParameterMap
in interfaceURIParameters
-
isFastToString
public boolean isFastToString()- Specified by:
isFastToString
in interfaceURIParameters
- Specified by:
isFastToString
in interfaceWritable
-
add
Description copied from interface:MutableURIParameters
Adds a parameter with a single value.- Specified by:
add
in interfaceMutableURIParameters
- Parameters:
name
- Required whenvalue
is notnull
.value
- Whennull
, no parameter is added.
-
add
Description copied from interface:MutableURIParameters
Adds a parameter with a single value.The conversion to string may be deferred, or the value may be streamed instead of being converted to a string. It is incorrect to change the state of the provided value; doing so may or may not affect the value of the resulting parameter.
When the value is an
Enum
, the parameter value is obtained fromEnum.name()
instead ofEnum.toString()
. This is to intuitively use enums as parameters whenEnum.toString()
is overridden.- Specified by:
add
in interfaceMutableURIParameters
- Parameters:
name
- Required whenvalue
is notnull
.value
- Whennull
, no parameter is added.- See Also:
-
add
Description copied from interface:MutableURIParameters
Adds a parameter with multiple values.The iteration of values will be performed immediately, but the conversion to string may be deferred, or the value may be streamed instead of being converted to a string. It is incorrect to change the state of the provided value; doing so may or may not affect the value of the resulting parameter.
When a value is an
Enum
, the parameter value is obtained fromEnum.name()
instead ofEnum.toString()
. This is to intuitively use enums as parameters whenEnum.toString()
is overridden.- Specified by:
add
in interfaceMutableURIParameters
- Parameters:
name
- Required whenvalue
has any element that is notnull
.values
- Whennull
, no parameters are added. When an element isnull
, no parameter is added.- See Also:
-
add
Description copied from interface:MutableURIParameters
Adds a parameter with multiple values.The iteration of values will be performed immediately, but the conversion to string may be deferred, or the value may be streamed instead of being converted to a string. It is incorrect to change the state of the provided value; doing so may or may not affect the value of the resulting parameter.
When a value is an
Enum
, the parameter value is obtained fromEnum.name()
instead ofEnum.toString()
. This is to intuitively use enums as parameters whenEnum.toString()
is overridden.- Specified by:
add
in interfaceMutableURIParameters
- Parameters:
name
- Required whenvalue
has any element that is notnull
.values
- Whennull
, no parameters are added. When an element isnull
, no parameter is added.- See Also:
-