Interface Blackboard
-
- All Known Implementing Classes:
StandardBlackboard
public interface Blackboard
An 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> V
get(Key<V> key)
<V> V
getOrCreate(Key<V> key, Supplier<? super V> defaultValue)
Retrieves a value bykey
or from thedefault value
.
-
-
-
Method Detail
-
getOrCreate
<V> V getOrCreate(Key<V> key, Supplier<? super V> defaultValue)
Retrieves a value bykey
or 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
-
-