Class ConstantNode
- Namespace
- LogicalOptimizer
- Assembly
- LogicalOptimizer.Core.dll
Boolean constant (0 or 1). A dedicated node type so that algorithms never have to remember that some "variables" are not really variables.
public sealed class ConstantNode : AstNode
- Inheritance
-
ConstantNode
- Inherited Members
Constructors
ConstantNode(bool)
public ConstantNode(bool value)
Parameters
valuebool
Fields
False
public static readonly ConstantNode False
Field Value
True
public static readonly ConstantNode True
Field Value
Properties
Value
public bool Value { get; }
Property Value
Methods
Clone()
public override AstNode Clone()
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.