Package com.google.adk.workflow
Class EdgesBuilder.EdgeChain
java.lang.Object
com.google.adk.workflow.EdgesBuilder.EdgeChain
- Enclosing class:
- EdgesBuilder
A chain of edges positioned at a node, started by
EdgesBuilder.from(Node), EdgesBuilder.fromStart() or EdgesBuilder.NodeGroupChain.joinTo(com.google.adk.workflow.JoinNode). then(Node) and chain(com.google.adk.workflow.Node, com.google.adk.workflow.Node, com.google.adk.workflow.Node...) add edges and continue from the last node they connect, a fan-out continues from its
targets as a group, and a routing map ends the chain.-
Method Summary
Modifier and TypeMethodDescriptionConnects the current node tofirst,secondand each node inrestin order, and continues from the last one:g.fromStart().chain(a, b)is short forg.fromStart().then(a).then(b).voidroute(Consumer<? super EdgesBuilder.RouteMap> routeMapDefinition) Adds the current node's routing map, whichrouteMapDefinitionfills, and ends the chain.Connects the current node tonextand continues fromnext.Fans out by connecting the current node tofirst,secondand each node inrest, likethen(Collection):g.from(a).then(b, c).joinTo(join).then(Collection<? extends Node> targets) Fans out by connecting the current node to each oftargets(such as a computed list) so they run concurrently, and continues from them as a group thatEdgesBuilder.NodeGroupChain.joinTo(com.google.adk.workflow.JoinNode)can join.
-
Method Details
-
then
Connects the current node tonextand continues fromnext. -
then
Fans out by connecting the current node to each oftargets(such as a computed list) so they run concurrently, and continues from them as a group thatEdgesBuilder.NodeGroupChain.joinTo(com.google.adk.workflow.JoinNode)can join. An empty collection adds no edges. -
then
@CanIgnoreReturnValue public EdgesBuilder.NodeGroupChain then(Node first, Node second, Node... rest) Fans out by connecting the current node tofirst,secondand each node inrest, likethen(Collection):g.from(a).then(b, c).joinTo(join). -
chain
Connects the current node tofirst,secondand each node inrestin order, and continues from the last one:g.fromStart().chain(a, b)is short forg.fromStart().then(a).then(b). -
route
Adds the current node's routing map, whichrouteMapDefinitionfills, and ends the chain.- Throws:
IllegalArgumentException- if the routing map has no entriesIllegalStateException- if an entry started byEdgesBuilder.RouteMap.on(java.lang.String)has no target
-