Package com.embabel.agent.core
Interface Bindable
-
- All Implemented Interfaces:
public interface BindableAllows binding and retrieval of objects using Kotlin operator functions and traditional get/set
-
-
Method Summary
Modifier and Type Method Description abstract Unitset(String key, Object value)Bind a value to a name abstract Bindablebind(String key, Object value)abstract BindablebindProtected(String key, Object value)Bind a value to a name and mark it as protected. abstract BindableaddObject(Object value)Add to entries without binding to a variable name. UnitaddAll(List<Object> objects)abstract UnitplusAssign(Object value)abstract UnitplusAssign(Pair<String, Object> pair)UnitplusAssign(Map<String, Object> bindings)UnitbindAll(Map<String, Object> bindings)-
-
Method Detail
-
bindProtected
abstract Bindable bindProtected(String key, Object value)
Bind a value to a name and mark it as protected. Protected bindings survive Blackboard.clear operations, which occur during state transitions. Use this for bindings that should persist across states, such as conversation history and user identity.
-
addObject
abstract Bindable addObject(Object value)
Add to entries without binding to a variable name. Implementations must respect the order in which entities were added. This is equivalent to using the default binding name as the key. For example, if you add a Dog to the blackboard without a key, it will be bound to the default binding name "it" and will be the last entry in the list of objects. Equivalent:
blackboard["it"] = dog blackboard.addObject(dog)
-
plusAssign
abstract Unit plusAssign(Object value)
-
plusAssign
abstract Unit plusAssign(Pair<String, Object> pair)
-
plusAssign
Unit plusAssign(Map<String, Object> bindings)
-
-
-
-