public final class Blackboard
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static BlackboardMap.Key<java.lang.Boolean> |
DEBUG |
static BlackboardMap.Key<java.nio.file.Path> |
GAME_JAR |
static BlackboardMap.Key<java.nio.file.Path> |
GAME_LIBRARIES |
static BlackboardMap.Key<java.lang.String> |
GAME_LOCATOR |
static BlackboardMap.Key<java.lang.String> |
GAME_TARGET |
static BlackboardMap.Key<java.nio.file.Path> |
MODS_DIRECTORY |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
compute(BlackboardMap.Key<T> key,
@NotNull java.util.function.Supplier<T> supplier)
Supplies the value associated with the
BlackboardMap.Key. |
static <T> @NotNull java.util.Optional<T> |
get(BlackboardMap.Key<T> key)
Returns the value associated with the
BlackboardMap.Key. |
static <T> BlackboardMap.Key<T> |
key(@NotNull java.lang.String key,
@NotNull java.lang.Class<? super T> type,
T defaultValue)
Returns a new
BlackboardMap.Key for the given key, type and
default value. |
static <T> void |
put(BlackboardMap.Key<T> key,
T value)
Sets the value associated with the
BlackboardMap.Key. |
static <T> T |
raw(BlackboardMap.Key<T> key)
Returns the value associated with the
BlackboardMap.Key. |
public static final BlackboardMap.Key<java.lang.Boolean> DEBUG
public static final BlackboardMap.Key<java.lang.String> GAME_LOCATOR
public static final BlackboardMap.Key<java.nio.file.Path> GAME_JAR
public static final BlackboardMap.Key<java.lang.String> GAME_TARGET
public static final BlackboardMap.Key<java.nio.file.Path> GAME_LIBRARIES
public static final BlackboardMap.Key<java.nio.file.Path> MODS_DIRECTORY
@NotNull public static <T> @NotNull java.util.Optional<T> get(BlackboardMap.Key<T> key)
BlackboardMap.Key.T - the value typekey - the keypublic static <T> T raw(BlackboardMap.Key<T> key)
BlackboardMap.Key.T - the value typekey - the keypublic static <T> void compute(BlackboardMap.Key<T> key, @NotNull @NotNull java.util.function.Supplier<T> supplier)
BlackboardMap.Key.T - the value typekey - the keysupplier - the supplierpublic static <T> void put(BlackboardMap.Key<T> key, @Nullable T value)
BlackboardMap.Key.T - the value typekey - the keyvalue - the valuepublic static <T> BlackboardMap.Key<T> key(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.Class<? super T> type, @Nullable T defaultValue)
BlackboardMap.Key for the given key, type and
default value.T - the value typekey - the keytype - the typedefaultValue - the default value