of

fun <T, W> of(source: Node<T>, destination: Node<T>, weight: W? = null): Edge<T, W>

Creates a new Edge from source to destination, with an optional weight (null by default).