Package io.vertx.reactivex.uritemplate
Class Variables
- java.lang.Object
-
- io.vertx.reactivex.uritemplate.Variables
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<Variables>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Variables
addAll(JsonObject json)
Populates with a JSON object:null
are conservedJsonArray
is converted toList
JsonObject
is converted toMap
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()
boolean
equals(Object o)
Object
get(String name)
Variables
getDelegate()
List<String>
getList(String name)
Map<String,String>
getMap(String name)
String
getSingle(String name)
int
hashCode()
Set<String>
names()
static Variables
newInstance(Variables arg)
Variables
set(String name, String value)
Set a single variable.Variables
set(String name, List<String> value)
Set a list variable.Variables
set(String name, Map<String,String> value)
Set a map variable.Variables
setAll(JsonObject json)
LikeaddAll(io.vertx.core.json.JsonObject)
but overwrites previous variables.String
toString()
static Variables
variables()
static Variables
variables(JsonObject json)
Create an instance populated from a JSON object:null
are conservedJsonArray
is converted toList
JsonObject
is converted toMap
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...
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<Variables> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public Variables getDelegate()
-
variables
public static Variables variables()
- Returns:
- an empty instance
-
variables
public static Variables variables(JsonObject json)
Create an instance populated from a JSON object:null
are conservedJsonArray
is converted toList
JsonObject
is converted toMap
- any other value is converted to a string
- Parameters:
json
- the json that populates the returned variables- Returns:
- an instance populated from a JSON object
-
set
public Variables set(String name, String value)
Set a single variable.- Parameters:
name
- the variable namevalue
- the variable value- Returns:
- a reference to this, so the API can be used fluently
-
set
public Variables set(String name, List<String> value)
Set a list variable.- Parameters:
name
- the variable namevalue
- the variable value- Returns:
- a reference to this, so the API can be used fluently
-
set
public Variables set(String name, Map<String,String> value)
Set a map variable.- Parameters:
name
- the variable namevalue
- the variable value- Returns:
- a reference to this, so the API can be used fluently
-
setAll
public Variables setAll(JsonObject json)
LikeaddAll(io.vertx.core.json.JsonObject)
but overwrites previous variables.- Parameters:
json
-- Returns:
-
addAll
public Variables addAll(JsonObject json)
Populates with a JSON object:null
are conservedJsonArray
is converted toList
JsonObject
is converted toMap
- any other value is converted to a string
- Parameters:
json
- the json that populates the returned variables- Returns:
- a reference to this, so the API can be used fluently
-
clear
public Variables clear()
-
getSingle
public String getSingle(String name)
- Parameters:
name
-- Returns:
- the single value of the variable
name
-
getList
public List<String> getList(String name)
- Parameters:
name
-- Returns:
- the list value of the variable
name
-
getMap
public Map<String,String> getMap(String name)
- Parameters:
name
-- Returns:
- the map value of the variable
name
-
-