Package com.tnsai.planning
Record Class PlannerHandle.PlanStep
java.lang.Object
java.lang.Record
com.tnsai.planning.PlannerHandle.PlanStep
- Record Components:
actionName- the action method name to invokeprecondition- condition that must be true before execution (may be empty)postcondition- expected state changes after execution (may be empty)fulfills- set of goal names this step contributes to
- Enclosing interface:
PlannerHandle
public static record PlannerHandle.PlanStep(String actionName, String precondition, String postcondition, Set<String> fulfills)
extends Record
A single step in an executable plan.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionNamerecord component.final booleanIndicates whether some other object is "equal to" this one.fulfills()Returns the value of thefulfillsrecord component.final inthashCode()Returns a hash code value for this object.static PlannerHandle.PlanStepCreates a simple plan step with just an action name.static PlannerHandle.PlanStepCreates a plan step with fulfills information.Returns the value of thepostconditionrecord component.Returns the value of thepreconditionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlanStep
Creates an instance of aPlanSteprecord class.- Parameters:
actionName- the value for theactionNamerecord componentprecondition- the value for thepreconditionrecord componentpostcondition- the value for thepostconditionrecord componentfulfills- the value for thefulfillsrecord component
-
-
Method Details
-
of
Creates a simple plan step with just an action name. -
of
public static PlannerHandle.PlanStep of(String actionName, String precondition, String postcondition, String... fulfills) Creates a plan step with fulfills information. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
actionName
Returns the value of theactionNamerecord component.- Returns:
- the value of the
actionNamerecord component
-
precondition
Returns the value of thepreconditionrecord component.- Returns:
- the value of the
preconditionrecord component
-
postcondition
Returns the value of thepostconditionrecord component.- Returns:
- the value of the
postconditionrecord component
-
fulfills
Returns the value of thefulfillsrecord component.- Returns:
- the value of the
fulfillsrecord component
-