- All Implemented Interfaces:
Writable,MutableURIParameters,URIParameters
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates 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 URIParametersMapAdds a parameter with a single value.getParameter(String name) Gets the value for the provided parameter name ornullif 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 ornullif has no values.booleanstatic URIParametersMapof()static URIParametersMapstatic URIParametersMapstatic URIParametersMapstatic URIParametersMapof(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) static URIParametersMapof(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5) static URIParametersMapstatic URIParametersMapstatic URIParametersMapstatic URIParametersMapof(String name1, String value1, String name2, String value2, String name3, String value3, String name4, String value4) static URIParametersMapof(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, waitMethods 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 ornullor""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:URIParametersGets the value for the provided parameter name ornullif doesn't exist. If the parameter has multiple values, the first value is returned.- Specified by:
getParameterin interfaceURIParameters
-
getParameterNames
Description copied from interface:URIParametersGets an unmodifiable iterator of the parameter names.- Specified by:
getParameterNamesin interfaceURIParameters
-
getParameterValues
Description copied from interface:URIParametersGets an unmodifiable view of all values for a multi-value parameter ornullif has no values.- Specified by:
getParameterValuesin interfaceURIParameters
-
getParameterMap
Description copied from interface:URIParametersGets an unmodifiable map view of all parameters.- Specified by:
getParameterMapin interfaceURIParameters
-
isFastToString
public boolean isFastToString()- Specified by:
isFastToStringin interfaceURIParameters- Specified by:
isFastToStringin interfaceWritable
-
add
Description copied from interface:MutableURIParametersAdds a parameter with a single value.- Specified by:
addin interfaceMutableURIParameters- Parameters:
name- Required whenvalueis notnull.value- Whennull, no parameter is added.
-
add
Description copied from interface:MutableURIParametersAdds 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:
addin interfaceMutableURIParameters- Parameters:
name- Required whenvalueis notnull.value- Whennull, no parameter is added.- See Also:
-
add
Description copied from interface:MutableURIParametersAdds 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:
addin interfaceMutableURIParameters- Parameters:
name- Required whenvaluehas 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:MutableURIParametersAdds 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:
addin interfaceMutableURIParameters- Parameters:
name- Required whenvaluehas any element that is notnull.values- Whennull, no parameters are added. When an element isnull, no parameter is added.- See Also:
-
