Table of Contents

Class TypeSet

Namespace
SpatialNET.Network
Assembly
SpatialNET.Network.dll

A set of type ids, the result of resolving type patterns once (ADR 0049). Searches and rules compare integers only. Immutable and thread-safe.

public sealed class TypeSet

Inheritance

Inherited Members

Properties

Count

The number of type ids.

public int Count { get; }

Property Value

int

Empty

The empty set.

public static TypeSet Empty { get; }

Property Value

TypeSet

TypeIds

The type ids, ascending.

public IReadOnlyList<int> TypeIds { get; }

Property Value

IReadOnlyList<int>

Untyped

The set with only the untyped helper nodes (type 0).

public static TypeSet Untyped { get; }

Property Value

TypeSet

Methods

Contains(int)

Whether the set contains the type id.

public bool Contains(int typeId)

Parameters

typeId int

Returns

bool

Of(params IEnumerable<int>)

A set of the given type ids, for hosts that know the ids already.

public static TypeSet Of(params IEnumerable<int> typeIds)

Parameters

typeIds IEnumerable<int>

Returns

TypeSet

Exceptions

ArgumentNullException

typeIds is null.

ArgumentOutOfRangeException

An id is negative.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Union(TypeSet)

The union with another set.

public TypeSet Union(TypeSet other)

Parameters

other TypeSet

Returns

TypeSet

Exceptions

ArgumentNullException

other is null.