API reference
API reference
Select your platform
No SDKs available
No versions available

HashSetExtensions Class

Non-allocating HashSet extension methods mirroring MS implementation https://referencesource.microsoft.com/#system.core/system/Collections/Generic/HashSet.cs.

Static Methods

ExceptWithNonAlloc< T > ( hashSetToModify , other )
Remove items in other from this set.
Modifies this set
Signature
static void Oculus.Interaction.HashSetExtensions.ExceptWithNonAlloc< T >(this HashSet< T > hashSetToModify, HashSet< T > other)
Parameters
hashSetToModify: this HashSet< T >
other: HashSet< T >  HashSet with items to remove
Returns
void
ExceptWithNonAlloc< T > ( hashSetToModify , other )
Remove items in other from this set.
Modifies this set
Signature
static void Oculus.Interaction.HashSetExtensions.ExceptWithNonAlloc< T >(this HashSet< T > hashSetToModify, IList< T > other)
Parameters
hashSetToModify: this HashSet< T >
other: IList< T >  IList with items to remove
Returns
void
OverlapsNonAlloc< T > ( hashSetToCheck , other )
Checks if this set overlaps other (i.e.
they share at least one item)
Signature
static bool Oculus.Interaction.HashSetExtensions.OverlapsNonAlloc< T >(this HashSet< T > hashSetToCheck, HashSet< T > other)
Parameters
hashSetToCheck: this HashSet< T >
other: HashSet< T >  HashSet to check overlap against
Returns
bool  true if these have at least one common element; false if disjoint
OverlapsNonAlloc< T > ( hashSetToCheck , other )
Checks if this set overlaps other (i.e.
they share at least one item)
Signature
static bool Oculus.Interaction.HashSetExtensions.OverlapsNonAlloc< T >(this HashSet< T > hashSetToCheck, IList< T > other)
Parameters
hashSetToCheck: this HashSet< T >
other: IList< T >  IList to check overlap against
Returns
bool  true if these have at least one common element; false if disjoint
UnionWithNonAlloc< T > ( hashSetToModify , other )
Take the union of this HashSet with other.
Modifies this set.
Signature
static void Oculus.Interaction.HashSetExtensions.UnionWithNonAlloc< T >(this HashSet< T > hashSetToModify, HashSet< T > other)
Parameters
hashSetToModify: this HashSet< T >
other: HashSet< T >  HashSet with items to add
Returns
void
UnionWithNonAlloc< T > ( hashSetToModify , other )
Take the union of this HashSet with other.
Modifies this set.
Signature
static void Oculus.Interaction.HashSetExtensions.UnionWithNonAlloc< T >(this HashSet< T > hashSetToModify, IList< T > other)
Parameters
hashSetToModify: this HashSet< T >
other: IList< T >  IList with items to add
Returns
void