Context is an immutable variant of the same key/value pairs structure which exposes
a write API that returns new instances on each write.
| Modifier and Type | Method and Description |
|---|---|
| public default void | forEach(BiConsumer<Object, Object>
The action to be performed for each entry action)Perform the given action for each entry in this |
| public < an unchecked casted generic for fluent typing convenience T> T | Returns: the value resolved for this key (throws if key not found)a lookup key to resolve the value within the context key)Resolve a value given a key that exists within the |
| public default < an unchecked casted generic for fluent typing convenience T> T | |
| public default <T> T | Returns: the value resolved for this key, or the given default if not presenta lookup key to resolve the value within the context key, T a fallback value if key doesn't resolve defaultValue)Resolve a value given a key within the |
| public default <T> Optional | Returns: anOptional of the value for that key.a lookup key to resolve the value within the context key)Resolve a value given a key within the |
| public boolean | |
| public default boolean | |
| public int | |
| public Stream |
| forEach | back to summary |
|---|---|
| public default void forEach(BiConsumer<Object, Object> action) Perform the given action for each entry in this
| |
| get | back to summary |
|---|---|
| public <T> T get(Object key) Resolve a value given a key that exists within the
| |
| get | back to summary |
|---|---|
| public default <T> T get(Class<T> key) Resolve a value given a type key within the
| |
| getOrDefault | back to summary |
|---|---|
| public default <T> T getOrDefault(Object key, T defaultValue) Resolve a value given a key within the | |
| getOrEmpty | back to summary |
|---|---|
| public default <T> Optional Resolve a value given a key within the | |
| hasKey | back to summary |
|---|---|
| public boolean hasKey(Object key) Return true if a particular key resolves to a value within the
| |
| isEmpty | back to summary |
|---|---|
| public default boolean isEmpty() Return true if the
| |
| size | back to summary |
|---|---|
| public int size() Return the size of this
| |
| stream | back to summary |
|---|---|
| public Stream Stream key/value pairs from this | |