public final class Composite extends java.lang.Object implements Bindings
Bindings which combines the values of other Bindings into one. Note that the order is
important in case two bindings contain a value with the same key. In such case the first binding wins.
To avoid conflicts, you can insert "prefix" sub-bindings like so
new Composite(
new MapBindings(map),
new SingletonBindings("$json", new JsonObjectBindings(jsonObject));
)
Given that the key "key" exists in both, the map and the jsonObject you would access
them like:
Map key: {{ key }}
JSON key: {{ $json.key }}
| Constructor and Description |
|---|
Composite(Bindings... bindings) |
Composite(java.lang.Iterable<Bindings> bindingsIterable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Returns whether these Bindings contain any values.
|
java.lang.Object |
resolve(java.lang.String key)
Returns a value for the given key or
null if no such key exists in these Bindings. |
public Composite(Bindings... bindings)
public Composite(java.lang.Iterable<Bindings> bindingsIterable)
public java.lang.Object resolve(@Nonnull
java.lang.String key)
Bindingsnull if no such key exists in these Bindings.