Xui.Core.Set
Assembly: Xui.Core · C# declarations · Assembly overview
Types
class EmptySet<T>
Represents an empty set — a set that contains no elements.
T— The type of elements the set could (but does not) contain.
This type always returns false from Xui.Core.Set.EmptySet1.Contains(0). It is a useful identity for set composition and for scenarios like default hit test areas or disabled regions.
public sealed class EmptySet<T> : INonEnumerableSet<T>
{
public static readonly EmptySet<T> Instance;
public bool Contains(T obj);
}
bool EmptySet<T>.Contains(T obj)
public bool Contains(T obj);
Always returns false, since no element belongs to the empty set.
obj— The object to test.
Returns: false for all inputs.
EmptySet<T> EmptySet<T>.Instance
public static readonly EmptySet<T> Instance;
A shared singleton instance of the empty set.
interface INonEnumerableSet<T>
Represents a mathematical set as defined by its membership test: whether an element belongs to the set.
T— The type of elements being tested for membership.
This interface does not imply enumeration, mutation, or collection semantics. It aligns with the pure set-theoretic notion where a set is characterized solely by the ability to determine if a value is a member of the set (i.e., x ∈ S).
public interface INonEnumerableSet<T>
{
public bool Contains(T obj);
}
bool INonEnumerableSet<T>.Contains(T obj)
public bool Contains(T obj);
Determines whether the specified element is a member of this set.
obj— The element to test for membership.
Returns: true if the element belongs to the set; otherwise, false.