public interface Variables
String
or a List<String>
or a Map<String, String>
.Modifier and Type | Method and Description |
---|---|
Variables |
addAll(JsonObject json)
Populates with a JSON object:
null are conserved
JsonArray is converted to List<String>
JsonObject is converted to Map<String, String>
any other value is converted to a string
Note that nested JSON elements are converted to a string, so { "user": { "first_name": "John", "last_name": "Doe", "address" : { "city": "Paris", etc... |
Variables |
clear() |
Object |
get(String name) |
List<String> |
getList(String name) |
Map<String,String> |
getMap(String name) |
String |
getSingle(String name) |
Set<String> |
names() |
Variables |
set(String name,
List<String> value)
Set a list variable.
|
Variables |
set(String name,
Map<String,String> value)
Set a map variable.
|
Variables |
set(String name,
String value)
Set a single variable.
|
default Variables |
setAll(JsonObject json)
Like
addAll(JsonObject) but overwrites previous variables. |
static Variables |
variables() |
static Variables |
variables(JsonObject json)
Create an instance populated from a JSON object:
null are conserved
JsonArray is converted to List<String>
JsonObject is converted to Map<String, String>
any other value is converted to a string
Note that nested JSON elements are converted to a string, so { "user": { "first_name": "John", "last_name": "Doe", "address" : { "city": "Paris", etc... |
static Variables variables()
static Variables variables(JsonObject json)
null
are conservedJsonArray
is converted to List<String>
JsonObject
is converted to Map<String, String>
json
- the json that populates the returned variablesVariables set(String name, String value)
name
- the variable namevalue
- the variable valueVariables set(String name, List<String> value)
name
- the variable namevalue
- the variable valueVariables set(String name, Map<String,String> value)
name
- the variable namevalue
- the variable valuedefault Variables setAll(JsonObject json)
addAll(JsonObject)
but overwrites previous variables.Variables addAll(JsonObject json)
null
are conservedJsonArray
is converted to List<String>
JsonObject
is converted to Map<String, String>
json
- the json that populates the returned variablesVariables clear()
Copyright © 2023 Eclipse. All rights reserved.