Record Class ConditionalAgent
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.workflow.ConditionalAgent
public record ConditionalAgent(String condition, Predicate<AgenticScope> predicate, List<AgentInstance> agentInstances)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalAgent(String condition, Predicate<AgenticScope> predicate, List<AgentInstance> agentInstances) Creates an instance of aConditionalAgentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentInstancesrecord component.Returns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionalAgent
public ConditionalAgent(String condition, Predicate<AgenticScope> predicate, List<AgentInstance> agentInstances) Creates an instance of aConditionalAgentrecord class.- Parameters:
condition- the value for theconditionrecord componentpredicate- the value for thepredicaterecord componentagentInstances- the value for theagentInstancesrecord component
-
-
Method Details
-
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). -
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
agentInstances
Returns the value of theagentInstancesrecord component.- Returns:
- the value of the
agentInstancesrecord component
-