Class VariableNode

Namespace
LogicalOptimizer
Assembly
LogicalOptimizer.Core.dll

Named boolean variable. Immutable; hash code is computed once in the constructor.

public sealed class VariableNode : AstNode
Inheritance
VariableNode
Inherited Members

Constructors

VariableNode(string)

Creates a variable with the given name.

public VariableNode(string name)

Parameters

name string

Properties

Name

Variable name.

public string Name { get; }

Property Value

string

Methods

Clone()

Nodes are fully immutable, so cloning returns the same instance.

public override AstNode Clone()

Returns

AstNode

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetVariables()

public override HashSet<string> GetVariables()

Returns

HashSet<string>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.