EdgeChain

A chain of edges for Java callers, positioned at a node. EdgesBuilder.from starts a chain, and each call adds the same edges as the edges DSL function of the same name and continues from its target.

Functions

Link copied to clipboard
fun chain(first: Node, second: Node, vararg rest: Node): EdgeChain

Connects the current node to first, second, and each node in rest in order, adding an edge from each node to the next and continuing from the last node. This adds the same edges as EdgesBuilder.chain would when starting from the current node: g.fromStart().chain(a, b) is the Java equivalent of chain(Start, a, b).

Link copied to clipboard

Starts an edge that fires when the current node emits route; PendingEdgeChain.then completes it.

Starts one edge that fires once when the current node emits any of routes (built with EdgesBuilder.anyOf); PendingEdgeChain.then completes it.

Starts an edge that fires when the current node emits route as a Route.Flag; PendingEdgeChain.then completes it.

fun on(route: Int): PendingEdgeChain

Starts an edge that fires when the current node emits route as a Route.Num; PendingEdgeChain.then completes it.

Starts an edge that fires when the current node emits route as a Route.Tag; PendingEdgeChain.then completes it.

Link copied to clipboard

Adds the current node's routing map and ends the chain.

Link copied to clipboard

Connects the current node to next and continues from next.

Fans out from the current node to each node in targets and continues from the group.

Fans out from the current node to each node in targets (such as a computed list) and continues from them as a group. An empty collection adds no edges.

fun then(first: Node, second: Node, vararg rest: Node): NodeGroupChain

Fans out from the current node to first, second, and each node in rest, and continues from them as a group: g.from(a).then(b, c).joinTo(join).