public class Form extends Object
"application/x-www-form-urlencoded"
content type.Constructor and Description |
---|
Form()
Create a new form data instance.
|
Form(MultivaluedMap<String,String> store)
Create a new form data instance and register a custom underlying parameter store.
|
Form(String parameterName,
String parameterValue)
Create a new form data instance with a single parameter entry.
|
Modifier and Type | Method and Description |
---|---|
MultivaluedMap<String,String> |
asMap()
Returns multivalued map representation of the form.
|
Form |
param(String name,
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(String parameterName, 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<String,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(String name, String value)
name
- name of the parameter.value
- new parameter value to be added.Form
instance.public MultivaluedMap<String,String> asMap()
MultivaluedMap
Copyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.