public class Params extends Object
Note that only one type of values should be specified.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isList
True if the parameters are a list of values.
|
protected boolean |
isMap
True if the parameters are a map of key / value pairs.
|
protected Map<String,Object> |
mapValues |
protected List<Object> |
values |
Constructor and Description |
---|
Params()
Creates a new params instance.
|
Params(Map<String,Object> values)
Creates a new params instance.
|
Params(Object... values)
Creates a new params instance.
|
Params(String key,
Object value)
Creates a new parameters instance.
|
Modifier and Type | Method and Description |
---|---|
Params |
add(Object value)
Adds a value.
|
List<Object> |
getList()
Returns the list values.
|
Map<String,Object> |
getMap()
Returns the values as a map.
|
boolean |
isList()
Returns true if the parameters are a list.
|
boolean |
isMap()
Returns true if the parameters are a map.
|
Params |
set(String key,
Object value)
Sets a value.
|
protected boolean isList
protected boolean isMap
public Params()
public Params(Map<String,Object> values)
values
- the initial valuespublic Params(Object... values)
values
- the initial valuespublic Params add(Object value)
value
- the value to addpublic boolean isList()
public boolean isMap()
Copyright © 2020. All rights reserved.