Class HumlSequence

Namespace
Huml.Net.Parser
Assembly
Huml.Net.dll

Represents a sequence of items (a HUML list).

public sealed record HumlSequence : HumlNode, IEquatable<HumlNode>, IEquatable<HumlSequence>
Inheritance
HumlSequence
Implements
Inherited Members

Remarks

Equality is element-wise and structural (see Huml.Net.Parser.HumlNodeEquality) — the compiler-generated equality would compare the Items list by reference.

Constructors

HumlSequence(IReadOnlyList<HumlNode>)

Represents a sequence of items (a HUML list).

public HumlSequence(IReadOnlyList<HumlNode> Items)

Parameters

Items IReadOnlyList<HumlNode>

The ordered list of child nodes.

Remarks

Equality is element-wise and structural (see Huml.Net.Parser.HumlNodeEquality) — the compiler-generated equality would compare the Items list by reference.

Properties

Items

The ordered list of child nodes.

public IReadOnlyList<HumlNode> Items { get; init; }

Property Value

IReadOnlyList<HumlNode>

Methods

Equals(HumlSequence?)

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

public bool Equals(HumlSequence? other)

Parameters

other HumlSequence

An object to compare with this object.

Returns

bool

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

GetHashCode()

Returns a hash code based only on the runtime type, consistent with the overridden Equals(HumlNode?) that excludes Line and Column. Derived types override this further to incorporate their primary-constructor parameters.

public override int GetHashCode()

Returns

int