Edge

data class Edge(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. Most edges select on a single route (or none, for an unconditional edge), so the Route/null constructor is the common way to build one; the List form is for the rarer 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.