Table of Contents

Class EmptySet<T>

Namespace
Xui.Core.Set
Assembly
Core.dll

Represents an empty set — a set that contains no elements.

public sealed class EmptySet<T> : INonEnumerableSet<T>

Type Parameters

T

The type of elements the set could (but does not) contain.

Inheritance
EmptySet<T>
Implements
Inherited Members

Remarks

This type always returns false from Contains(T). It is a useful identity for set composition and for scenarios like default hit test areas or disabled regions.

Fields

Instance

A shared singleton instance of the empty set.

public static readonly EmptySet<T> Instance

Field Value

EmptySet<T>

Methods

Contains(T)

Always returns false, since no element belongs to the empty set.

public bool Contains(T obj)

Parameters

obj T

The object to test.

Returns

bool

false for all inputs.