KS.Unity.ksSerializableHashSet< T > Class Template Reference

A hash set that implements ISerializationCallbackReceiver for serializing data. More...

Inheritance diagram for KS.Unity.ksSerializableHashSet< T >:

Public Member Functions

bool Add (T item)
 Adds an item to the set. More...
 
void Clear ()
 Removes all items from the set. More...
 
bool Contains (T item)
 Checks if an item is in the set. More...
 
void CopyTo (T[] array, int arrayIndex)
 Copies the contents of the set to an array. More...
 
void ExceptWith (IEnumerable< T > other)
 Removes items in another collection from this set. More...
 
IEnumerator< T > GetEnumerator ()
 Iterates the set. More...
 
void IntersectWith (IEnumerable< T > other)
 Removes items from this set that are not in another collection. More...
 
bool IsProperSubsetOf (IEnumerable< T > other)
 Checks if this set is a proper subset of another collection, meaning all of the items in this set are in the other collection and the other collection contains at least one item that is not in the set. More...
 
bool IsProperSupersetOf (IEnumerable< T > other)
 Checks if this set is a proper superset of another collection, meaning all of the items in the other collection are in this set and this set contains at least one item that is not in the other collection. More...
 
bool IsSubsetOf (IEnumerable< T > other)
 Checks if this set is a subset of another collection, meaning all of the items in this set are in the other collection. More...
 
bool IsSupersetOf (IEnumerable< T > other)
 Checks if this set is a superset of another collection, meaning all of the items in the other collection are in this set. More...
 
bool Overlaps (IEnumerable< T > other)
 Checks if any of the items in another collection are in this set. More...
 
bool Remove (T item)
 Removes an item from the set. More...
 
bool SetEquals (IEnumerable< T > other)
 Checks if this set and another collection contain all the same items. More...
 
void SymmetricExceptWith (IEnumerable< T > other)
 Remove items from this set that are in other, and adds items from other that are not in this set. More...
 
void UnionWith (IEnumerable< T > other)
 Adds items to this set. More...
 

Properties

int Count [get]
 The number of items in the hash set. More...
 
bool IsReadOnly [get]
 Is the hash set read-only? More...
 

Detailed Description

A hash set that implements ISerializationCallbackReceiver for serializing data.

Member Function Documentation

◆ Add()

bool KS.Unity.ksSerializableHashSet< T >.Add ( item)

Adds an item to the set.

Parameters
itemItem to add.
Returns
True if the item was added. False if it was already in the set.

◆ Clear()

void KS.Unity.ksSerializableHashSet< T >.Clear ( )

Removes all items from the set.

◆ Contains()

bool KS.Unity.ksSerializableHashSet< T >.Contains ( item)

Checks if an item is in the set.

Parameters
itemItem to check for.
Returns
True if the item is in the set.

◆ CopyTo()

void KS.Unity.ksSerializableHashSet< T >.CopyTo ( T[]  array,
int  arrayIndex 
)

Copies the contents of the set to an array.

Parameters
arrayArray to copy to.
arrayIndexIndex to begin copying to.

◆ ExceptWith()

void KS.Unity.ksSerializableHashSet< T >.ExceptWith ( IEnumerable< T >  other)

Removes items in another collection from this set.

Parameters
otherItems to remove this set.

◆ GetEnumerator()

IEnumerator<T> KS.Unity.ksSerializableHashSet< T >.GetEnumerator ( )

Iterates the set.

Returns
Iterator

◆ IntersectWith()

void KS.Unity.ksSerializableHashSet< T >.IntersectWith ( IEnumerable< T >  other)

Removes items from this set that are not in another collection.

Parameters
otherItems to intersect with.

◆ IsProperSubsetOf()

bool KS.Unity.ksSerializableHashSet< T >.IsProperSubsetOf ( IEnumerable< T >  other)

Checks if this set is a proper subset of another collection, meaning all of the items in this set are in the other collection and the other collection contains at least one item that is not in the set.

Parameters
otherItems to check if is this is a proper subset of.
Returns
True if this is a proper subset of the other items.

◆ IsProperSupersetOf()

bool KS.Unity.ksSerializableHashSet< T >.IsProperSupersetOf ( IEnumerable< T >  other)

Checks if this set is a proper superset of another collection, meaning all of the items in the other collection are in this set and this set contains at least one item that is not in the other collection.

Parameters
otherItems to check if is this is a proper superset of.
Returns
True if this is a proper superset of the other items.

◆ IsSubsetOf()

bool KS.Unity.ksSerializableHashSet< T >.IsSubsetOf ( IEnumerable< T >  other)

Checks if this set is a subset of another collection, meaning all of the items in this set are in the other collection.

Parameters
otherItems to check if is this is a subset of.
Returns
True if this is a subset of the other items.

◆ IsSupersetOf()

bool KS.Unity.ksSerializableHashSet< T >.IsSupersetOf ( IEnumerable< T >  other)

Checks if this set is a superset of another collection, meaning all of the items in the other collection are in this set.

Parameters
otherItems to check if is this is a superset of.
Returns
True if this is a superset of the other items.

◆ Overlaps()

bool KS.Unity.ksSerializableHashSet< T >.Overlaps ( IEnumerable< T >  other)

Checks if any of the items in another collection are in this set.

Parameters
otherItems to check for.
Returns
True if any of the items are in this set.

◆ Remove()

bool KS.Unity.ksSerializableHashSet< T >.Remove ( item)

Removes an item from the set.

Parameters
itemItem to remove.
Returns
True if the item was removed. False if it was not in the set.

◆ SetEquals()

bool KS.Unity.ksSerializableHashSet< T >.SetEquals ( IEnumerable< T >  other)

Checks if this set and another collection contain all the same items.

Parameters
otherItems to check for.
Returns
True if this set contains exactly the same items as other .

◆ SymmetricExceptWith()

void KS.Unity.ksSerializableHashSet< T >.SymmetricExceptWith ( IEnumerable< T >  other)

Remove items from this set that are in other, and adds items from other that are not in this set.

Parameters
otherOther items to symmetric except with.

◆ UnionWith()

void KS.Unity.ksSerializableHashSet< T >.UnionWith ( IEnumerable< T >  other)

Adds items to this set.

Parameters
otherItems to add.

Property Documentation

◆ Count

int KS.Unity.ksSerializableHashSet< T >.Count
get

The number of items in the hash set.

◆ IsReadOnly

bool KS.Unity.ksSerializableHashSet< T >.IsReadOnly
get

Is the hash set read-only?