ReferenceByName

class ReferenceByName<N : PossiblyNamed>(val name: String, initialReferred: N? = null) : Serializable

A reference associated by using a name. It can be used only to refer to Nodes and not to other values.

This is not statically enforced as we may want to use some interface, which cannot extend Node. However, this is enforced dynamically.

Constructors

Link copied to clipboard
constructor(name: String, initialReferred: N? = null)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Try to resolve the reference by assigining @parampossibleValue. The assignment is not performed if

fun <N : PossiblyNamed> ReferenceByName<N>.tryToResolve(candidates: Iterable<N>, caseInsensitive: Boolean = false): Boolean

Try to resolve the reference by finding a named element with a matching name. The name match is performed in a case sensitive or insensitive way depending on the value of @paramcaseInsensitive.

Properties

Link copied to clipboard
Link copied to clipboard
var referred: N?
Link copied to clipboard