Node

interface Node<T>

A node of a Graph, wrapping a payload value of type T. A Node is a distinct, identity-less wrapper around value (two Nodes built from ==-equal values are themselves ==-equal, since the default implementation returned by Node.of is a data class), so that the same graph can, e.g., use plain Strings or numbers as node payloads without those values having to implement any graph-specific interface. Build one via Node.of, or the nodeOf top-level shorthand.

Type Parameters

T

is the type of the payload carried by this node

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val value: T

The payload wrapped by this node.