Variable class

A named Prolog variable capable of binding during unification.

Variable names begin with an uppercase letter or an underscore.

For example:

final x = Variable('X');
Inheritance
Annotations
  • @immutable

Constructors

Variable(String name)
Creates a variable with the given name.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
name → String
The name of the variable.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

match(Node other) → Map<Variable, Node>?
Attempts to unify this node with other, returning variable bindings or null.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
substitute(Map<Variable, Node>? bindings) → Node
Substitutes variables in this node with their bound values in bindings.
override
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override