Class NonNullableHashSet<T>
Inheritance
NonNullableHashSet<T>
Assembly: Unity.VisualScripting.Core.dll
Syntax
public class NonNullableHashSet<T> : ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Constructors
NonNullableHashSet()
Declaration
public NonNullableHashSet()
NonNullableHashSet(IEnumerable<T>)
Declaration
public NonNullableHashSet(IEnumerable<T> collection)
Parameters
NonNullableHashSet(IEnumerable<T>, IEqualityComparer<T>)
Declaration
public NonNullableHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
Parameters
NonNullableHashSet(IEqualityComparer<T>)
Declaration
public NonNullableHashSet(IEqualityComparer<T> comparer)
Parameters
Properties
Count
Declaration
public int Count { get; }
Property Value
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Methods
Add(T)
Adds the specified item to the set.
Declaration
Parameters
Type |
Name |
Description |
T |
item |
The item to add to the set.
|
Returns
Type |
Description |
bool |
true if the item was added to the set (i.e., it was not already present);
otherwise, false .
|
Clear()
Declaration
Contains(T)
Declaration
public bool Contains(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
CopyTo(T[], int)
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
T[] |
array |
|
int |
arrayIndex |
|
ExceptWith(IEnumerable<T>)
Modifies the current set to contain only elements that are not present in the specified collection.
Declaration
public void ExceptWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
IntersectWith(IEnumerable<T>)
Modifies the current set to contain only elements that are present in both the current set and the specified collection.
Declaration
public void IntersectWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
IsProperSubsetOf(IEnumerable<T>)
Determines whether the current set is a proper subset of the specified collection. A proper subset is a subset that is not equal to the other set.
Declaration
public bool IsProperSubsetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set is a proper subset of the specified collection; otherwise, false .
|
IsProperSupersetOf(IEnumerable<T>)
Determines whether the current set is a proper superset of the specified collection. A proper superset is a superset that is not equal to the other set.
Declaration
public bool IsProperSupersetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set is a proper superset of the specified collection; otherwise, false .
|
IsSubsetOf(IEnumerable<T>)
Determines whether the current set is a subset of the specified collection.
Declaration
public bool IsSubsetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set is a subset of the specified collection; otherwise, false .
|
IsSupersetOf(IEnumerable<T>)
Determines whether the current set is a superset of the specified collection.
Declaration
public bool IsSupersetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set is a superset of the specified collection; otherwise, false .
|
Overlaps(IEnumerable<T>)
Determines whether the current set has any elements in common with the specified collection.
Declaration
public bool Overlaps(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set and the specified collection share at least one common element; otherwise, false .
|
Remove(T)
Declaration
public bool Remove(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
SetEquals(IEnumerable<T>)
Determines whether the current set and the specified collection contain the same elements.
Declaration
public bool SetEquals(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Returns
Type |
Description |
bool |
true if the current set and the specified collection contain the same elements; otherwise, false .
|
SymmetricExceptWith(IEnumerable<T>)
Modifies the current set to contain only elements that are present either in the current set or in the specified collection, but not both.
Declaration
public void SymmetricExceptWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
UnionWith(IEnumerable<T>)
Modifies the current set to contain all elements that are present in either the current set or the specified collection.
Declaration
public void UnionWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
other |
The collection to compare to the current set.
|
Implements
Extension Methods