public class Parameters extends Object
Utility class to build populated `Map` instances. Page instances are mutable (builder-like).
Usage:
Map<String, Object> params = Parameters.with("foo", foo)
.and("bar", bar)
.and("gee", gee)
.map();
Constructor and Description |
---|
Parameters() |
Modifier and Type | Method and Description |
---|---|
Parameters |
and(String name,
Object value)
Add a parameter to this
Parameters . |
Map<String,Object> |
map()
Constructs an unmodifiable
Map with the current parameters. |
static Parameters |
with(String name,
Object value)
Build a
Parameters with a single parameter. |
public Parameters and(String name, Object value)
Parameters
.name
- name of the parameter to addvalue
- value of the parameter to addParameters#map()}
public Map<String,Object> map()
Map
with the current parameters.Map
with the current parameters.public static Parameters with(String name, Object value)
Parameters
with a single parameter.name
- name of the first parametervalue
- value of the first parameterParameters
with a single parameter.Parameters#and(String, Object)}
,
Parameters#map()}
Copyright © 2020 JBoss by Red Hat. All rights reserved.