Interface Blackboard
-
- All Known Implementing Classes:
StandardBlackboard
public interface BlackboardAn entity that stores various properties for anenvironment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> Optional<V>find(Key<V> key)<V> Vget(Key<V> key)<V> VgetOrCreate(Key<V> key, Supplier<? super V> defaultValue)Retrieves a value bykeyor from thedefault value.
-
-
-
Method Detail
-
getOrCreate
<V> V getOrCreate(Key<V> key, Supplier<? super V> defaultValue)
Retrieves a value bykeyor from thedefault value.- Type Parameters:
V- The value type- Parameters:
key- The keydefaultValue- The default value- Returns:
- The value
-
get
<V> V get(Key<V> key)
- Type Parameters:
V- The value type- Parameters:
key- The key- Returns:
- The value
- Throws:
IllegalArgumentException- if the key has no corresponding value
-
find
<V> Optional<V> find(Key<V> key)
- Type Parameters:
V- The value type- Parameters:
key- The key- Returns:
- The value or
Optional.empty()otherwise
-
-