public class DynamicDefaultKey<T> extends DataKey<T>
This has the effect of this key returning the value of another key until this key receives its own value.
| Constructor and Description |
|---|
DynamicDefaultKey(String name,
DataKey<? extends T> defaultKey)
Creates a
DataKey with a dynamic fallback to the value of another key. |
DynamicDefaultKey(String name,
DataValueFactory<T> factory) |
| Modifier and Type | Method and Description |
|---|---|
T |
getDefaultValue(DataHolder holder) |
public DynamicDefaultKey(String name, DataValueFactory<T> factory)
public T getDefaultValue(DataHolder holder)
getDefaultValue in class DataKey<T>Copyright © 2019. All rights reserved.