Record Class CardAction.Contract
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.api.ad.CardAction.Contract
- Enclosing class:
CardAction
public static record CardAction.Contract(List<String> pre, List<String> post, String cost, List<String> methods)
extends Record
The planner's view of an action (SPEC ยง6.1b, v0.1.25):
pre, the situation names or
conditions that must hold before the action runs (beside its consumed schemas); post,
the schemas it produces and the situations it establishes (beside its produced schemas);
cost, a free hint a planner orders by ("1", "low", "PT2M"); methods, the HTN
method names the action belongs to (reserved for strategy B4). Each list holds at most
CardAction.MAX_CONTRACT_TERMS terms.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncost()Returns the value of thecostrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.methods()Returns the value of themethodsrecord component.static CardAction.ContractNull when every term is empty, so an empty contract never reaches the wire.post()Returns the value of thepostrecord component.pre()Returns the value of theprerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Contract
Creates an instance of aContractrecord class.- Parameters:
pre- the value for theprerecord componentpost- the value for thepostrecord componentcost- the value for thecostrecord componentmethods- the value for themethodsrecord component
-
-
Method Details
-
of
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pre
-
post
-
cost
Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-
methods
-