public final class EntryBindings extends java.lang.Object implements Bindings, java.lang.Iterable<java.lang.Object>
Bindings for Map.Entry.
It provides access to key and value of an Entry like so
{{ item.key }} -> {{ item.value }}
Note: strictly spoken this would not be necessary, because the reflection function resolution would do the
same (by calling Map.Entry#getKey() and Map.Entry#getValue(). A dedicated Bindings class is,
however, considered better design and certainly faster.
| Constructor and Description |
|---|
EntryBindings(java.util.Map.Entry<java.lang.String,java.lang.Object> entry) |
EntryBindings(java.lang.String key,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Returns whether these Bindings contain any values.
|
java.util.Iterator<java.lang.Object> |
iterator() |
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 EntryBindings(java.lang.String key,
java.lang.Object value)
public EntryBindings(java.util.Map.Entry<java.lang.String,java.lang.Object> entry)
public java.lang.Object resolve(@Nonnull
java.lang.String key)
Bindingsnull if no such key exists in these Bindings.public boolean isEmpty()
Bindingspublic java.util.Iterator<java.lang.Object> iterator()
iterator in interface java.lang.Iterable<java.lang.Object>