Modifier and Type | Class and Description |
---|---|
class |
Context.BindingBuilder<T>
Associates a value with a key in this context.
|
Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
<T> Context.BindingBuilder<T> |
bind(java.lang.Class<T> clazz)
Returns a binding builder for the given class.
|
<T> Context.BindingBuilder<T> |
bind(Property<T> property)
Returns a binding builder for the given property.
|
boolean |
containsKey(java.lang.Class<?> clazz)
Returns whether this context has a value associated with the given class.
|
boolean |
containsKey(Property<?> property)
Returns whether this context has a value associated with the given
property.
|
<T> T |
get(java.lang.Class<T> clazz)
Returns the context value associated with the given class.
|
<T> T |
get(Property<T> property)
Returns the context value associated with the given property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOrDefault
public <T> T get(Property<T> property)
IContext
public <T> T get(java.lang.Class<T> clazz)
IContext
public boolean containsKey(Property<?> property)
IContext
containsKey
in interface IContext
property
- the property being queried (not null
)true
if this context has a value
for the given property, and false
otherwisepublic boolean containsKey(java.lang.Class<?> clazz)
IContext
containsKey
in interface IContext
clazz
- the class being queried (not null
)true
if this context has a value
for the given class, and false
otherwisepublic <T> Context.BindingBuilder<T> bind(Property<T> property)
property
- the property to bind (not null
)null
)public <T> Context.BindingBuilder<T> bind(java.lang.Class<T> clazz)
clazz
- the class to bind (not null
)null
)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0