Class HashSetList<T>
Wrapper data structure for hashset, that leans on a list for deterministic sort order
Inherited Members
Namespace: Unity.XR.CoreUtils.Collections
Assembly: solution.dll
Syntax
public class HashSetList<T> : ISerializable, IDeserializationCallback, ISet<T>, ICollection<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T | HashSetList type |
Constructors
Name | Description |
---|---|
HashSetList(int) | Allocates internal list and hashset. |
Properties
Name | Description |
---|---|
Count | Internal list count. |
this[int] | Access internal list element from index. |
Methods
Name | Description |
---|---|
Add(T) | Attempt to add item to internal hashset. If it is not already in the hashset, add it to the list. |
AsList() | Exposes internal list without any allocation. |
Clear() | Clear both internal hashset and list. |
Contains(T) | Checks if internal hashset contains item. |
CopyTo(T[], int) | Copies out internal list as array. |
ExceptWith(IEnumerable<T>) | Except operation with hashset. Regenerates internal list from new hashset. |
GetEnumerator() | Creates enumerator for internal list. |
GetObjectData(SerializationInfo, StreamingContext) | Calls internal hashset |
IntersectWith(IEnumerable<T>) |
|
IsProperSubsetOf(IEnumerable<T>) |
|
IsProperSupersetOf(IEnumerable<T>) |
|
IsSubsetOf(IEnumerable<T>) |
|
IsSupersetOf(IEnumerable<T>) |
|
OnDeserialization(object) | Deserializes sender object into internal hashset and refreshes list. |
Overlaps(IEnumerable<T>) |
|
Remove(T) | Attempt to remove item to internal hashset. If it is still present in the hashset, remove it from the list. |
SetEquals(IEnumerable<T>) | Check if set equals other Overlaps(IEnumerable<T>) operation with hashset. |
SymmetricExceptWith(IEnumerable<T>) |
|
UnionWith(IEnumerable<T>) |
|