public class Form
extends java.lang.Object
"application/x-www-form-urlencoded"
content type.Constructor and Description |
---|
Form()
Create a new form data instance.
|
Form(MultivaluedMap<java.lang.String,java.lang.String> store)
Create a new form data instance and register a custom underlying parameter store.
|
Form(java.lang.String parameterName,
java.lang.String parameterValue)
Create a new form data instance with a single parameter entry.
|
Modifier and Type | Method and Description |
---|---|
MultivaluedMap<java.lang.String,java.lang.String> |
asMap()
Returns multivalued map representation of the form.
|
Form |
param(java.lang.String name,
java.lang.String value)
Adds a new value to the specified form parameter.
|
public Form()
The underlying form parameter store is configured to preserve the insertion order
of the parameters. I.e. parameters can be iterated in the same order as they were
inserted into the Form
.
public Form(java.lang.String parameterName, java.lang.String parameterValue)
The underlying form parameter store is configured to preserve the insertion order
of the parameters. I.e. parameters can be iterated in the same order as they were
inserted into the Form
.
parameterName
- form parameter name.parameterValue
- form parameter value.public Form(MultivaluedMap<java.lang.String,java.lang.String> store)
This method is useful in situations when a custom parameter store is needed in order to change the default parameter iteration order, improve performance or facilitate other custom requirements placed on the parameter store.
store
- form data store used by the created form instance.public Form param(java.lang.String name, java.lang.String value)
name
- name of the parameter.value
- new parameter value to be added.Form
instance.public MultivaluedMap<java.lang.String,java.lang.String> asMap()
MultivaluedMap