- All Superinterfaces:
URIParameters
,Writable
- All Known Implementing Classes:
URIParametersMap
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptiondefault MutableURIParameters
Adds a parameter with multiple values.default MutableURIParameters
Adds a parameter with a single value.default MutableURIParameters
Adds a parameter with multiple values.Adds a parameter with a single value.default void
addParameter
(String name, String value) Deprecated.default void
addParameters
(String name, Iterable<? extends String> values) Deprecated.Please useadd(java.lang.String, java.lang.Iterable)
directly.Methods inherited from interface com.aoapps.net.URIParameters
appendTo, appendTo, appendTo, appendTo, getLength, getParameter, getParameterMap, getParameterNames, getParameterValues, isFastToString, toString, trim, writeTo, writeTo, writeTo, writeTo
-
Method Details
-
add
Adds a parameter with a single value.- Parameters:
name
- Required whenvalue
is notnull
.value
- Whennull
, no parameter is added.
-
add
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.- Parameters:
name
- Required whenvalue
is notnull
.value
- Whennull
, no parameter is added.- See Also:
-
addParameter
Deprecated.Please useadd(java.lang.String, java.lang.String)
directly.Adds a parameter with a single value.- Parameters:
name
- May not benull
.value
- May not benull
.
-
add
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.- 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
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.- 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:
-
addParameters
Deprecated.Please useadd(java.lang.String, java.lang.Iterable)
directly.Adds a parameter with multiple values.- Parameters:
name
- Required whenvalues
is notnull
.values
- Whennull
, no parameters are added. May not contain anynull
elements.
-
add(java.lang.String, java.lang.String)
directly.