Edge

data class Edge @JvmOverloads constructor(val from: Node, val to: Node, val routes: List<Route> = emptyList())

A connection between two nodes.

An edge carries the set of routes that select it. Omit the routes for an unconditional edge, pass a single Route for the usual conditional edge, or a List for an edge that fires on any of several routes.

Constructors

Link copied to clipboard
constructor(from: Node, to: Node, routes: List<Route> = emptyList())
constructor(from: Node, to: Node, route: Route?)

Builds an edge selected by a single route, or an unconditional one when route is null.

Properties

Link copied to clipboard
val from: Node

The node whose completion fires this edge.

Link copied to clipboard

Whether this edge fires regardless of the route the source emitted.

Link copied to clipboard

The routes that select this edge. An empty list makes the edge unconditional, so it fires whenever from completes.

Link copied to clipboard
val to: Node

The node this edge triggers.