| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private final @NotNull DataValueFactory | |
| private final @NotNull String |
| Access | Constructor and Description |
|---|---|
| public | DataKeyBase(@NotNull String
See name, T getName().default to use when data holder is null defaultValue, @NotNull DataValueFactory<T> data value factory for creating a new default value for the key for a non-null data holder factory)Creates a NullableDataKey with a computed default value and a provided default value when data holder is null. |
| public | DataKeyBase(@NotNull String
See name, @NotNull DataKeyBase<T> getName().The NullableDataKey to take the default value from at time of construction. defaultKey)Creates a NullableDataKey with a dynamic default value taken from a value of another key does not cache the returned default value but will always delegate to another key until this key gets its own value set. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | Returns: true if equalother o)Overrides java. Compare only by address. |
| public T | |
| public T | |
| public T | |
| public @NotNull DataValueFactory | |
| public final T | Returns: return default value if holder is null, current value in holder or compute a new valuedata holder holder)
Deprecated
use get
|
| public @NotNull String | |
| public final int | |
| public String |
| defaultValue | back to summary |
|---|---|
| private final T defaultValue | |
| factory | back to summary |
|---|---|
| private final @NotNull DataValueFactory<T> factory
| |
| name | back to summary |
|---|---|
| private final @NotNull String name
| |
| DataKeyBase | back to summary |
|---|---|
| public DataKeyBase(@NotNull String name, T defaultValue, @NotNull DataValueFactory<T> factory) Creates a NullableDataKey with a computed default value and a provided default value when data holder is null. Use this constructor to ensure that factory is never called with null data holder value
| |
| DataKeyBase | back to summary |
|---|---|
| public DataKeyBase(@NotNull String name, @NotNull DataKeyBase<T> defaultKey) Creates a NullableDataKey with a dynamic default value taken from a value of another key does not cache the returned default value but will always delegate to another key until this key gets its own value set.
| |
| DataKeyBase | back to summary |
|---|---|
| public DataKeyBase(@NotNull String name, T defaultValue) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Overrides java. Compare only by address. Every key instance is unique | |
| get | back to summary |
|---|---|
| public T get(@Nullable DataHolder holder) | |
| getDefaultValue | back to summary |
|---|---|
| public T getDefaultValue() | |
| getDefaultValue | back to summary |
|---|---|
| public T getDefaultValue(@NotNull DataHolder holder) | |
| getFactory | back to summary |
|---|---|
public @NotNull DataValueFactory
| |
| getFrom | back to summary |
|---|---|
| public final T getFrom(@Nullable DataHolder holder)
Deprecated use get
| |
| getName | back to summary |
|---|---|
public @NotNull String getName()
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |