@FunctionalInterface
public interface DataContext
Modifier and Type | Field and Description |
---|---|
static DataContext |
EMPTY_CONTEXT |
Modifier and Type | Method and Description |
---|---|
default <T> T |
getData(DataKey<T> key)
Returns the value corresponding to the specified data key.
|
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
static final DataContext EMPTY_CONTEXT
java.lang.Object getData(java.lang.String dataId)
PlatformDataKeys
class.dataId
- the data identifier for which the value is requested.default <T> T getData(DataKey<T> key)
PlatformDataKeys
class.key
- the data key for which the value is requested.