Table of Contents

Struct EntityHandle

Namespace
Farkle.Grammars
Assembly
Farkle.dll

Points to a table row of a Grammar.

public readonly struct EntityHandle : IEquatable<EntityHandle>
Implements
Inherited Members

Properties

HasValue

Whether this EntityHandle has a valid value.

public bool HasValue { get; }

Property Value

bool

IsNonterminal

Whether this EntityHandle can be cast to a NonterminalHandle.

public bool IsNonterminal { get; }

Property Value

bool

IsProduction

Whether this EntityHandle can be cast to a ProductionHandle.

public bool IsProduction { get; }

Property Value

bool

IsTokenSymbol

Whether this EntityHandle can be cast to a TokenSymbolHandle.

public bool IsTokenSymbol { get; }

Property Value

bool

Methods

Equals(EntityHandle)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(EntityHandle other)

Parameters

other EntityHandle

An object to compare with this object.

Returns

bool

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

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(EntityHandle, EntityHandle)

Checks if two EntityHandles are pointing to the same table row.

public static bool operator ==(EntityHandle left, EntityHandle right)

Parameters

left EntityHandle

The first handle.

right EntityHandle

The second handle.

Returns

bool

Remarks

If left and right come from different Grammars the result is undefined.

operator !=(EntityHandle, EntityHandle)

Checks if two EntityHandles are not pointing to the same table row.

public static bool operator !=(EntityHandle left, EntityHandle right)

Parameters

left EntityHandle

The first handle.

right EntityHandle

The second handle.

Returns

bool

Remarks

If left and right come from different Grammars the result is undefined.