A hash set with an event that fires when the hash set is modified. More...
Public Member Functions | |
delegate void | ModifyHandler (ksHashSet< T > set) |
Set that was modified. More... | |
ksHashSet () | |
Constructor. More... | |
ksHashSet (IEnumerable< T > elements) | |
Constructor. More... | |
bool | Add (T element) |
Adds an element to the set if it is not already in the set. More... | |
void | Add (params T[] elements) |
Adds elements to the set. More... | |
void | Add (IEnumerable< T > elements) |
Adds elements to the set. More... | |
bool | Remove (T element) |
Removes an element from the set. More... | |
void | Remove (params T[] elements) |
Removes elements from the set. More... | |
void | Remove (IEnumerable< T > elements) |
Removes elements from the set. More... | |
void | Set (params T[] elements) |
Clears the set and adds the given elements. More... | |
void | Set (IEnumerable< T > elements) |
Clears the set and adds the given elements. More... | |
void | Clear () |
Clears the set. More... | |
bool | Contains (T element) |
Checks if the set contains an element? More... | |
bool | ContainsAll (params T[] elements) |
Checks if the set contains all of the given elements. More... | |
bool | ContainsAll (IEnumerable< T > elements) |
Checks if the set contains all of the given elements. More... | |
bool | ContainsAny (params T[] elements) |
Checks if the set contains any of the given elements. More... | |
bool | ContainsAny (IEnumerable< T > elements) |
Checks if the set contains any of the given elements. More... | |
void | CopyTo (T[] array, int arrayIndex) |
Copies the set elements into an array. More... | |
HashSet< T >.Enumerator | GetEnumerator () |
Gets the enumerator. More... | |
Public Attributes | |
ModifyHandler | OnModify |
Invoked when the hash set is modified. More... | |
Properties | |
int | Count [get] |
The number of elements in the set. More... | |
bool | IsReadOnly [get] |
Is this collection read-only? Always false. More... | |
A hash set with an event that fires when the hash set is modified.
T |
KS.Reactor.ksHashSet< T >.ksHashSet | ( | ) |
Constructor.
KS.Reactor.ksHashSet< T >.ksHashSet | ( | IEnumerable< T > | elements | ) |
Constructor.
elements | Elements to initialize the set with. |
void KS.Reactor.ksHashSet< T >.Add | ( | IEnumerable< T > | elements | ) |
Adds elements to the set.
elements | Elements to add. |
void KS.Reactor.ksHashSet< T >.Add | ( | params T[] | elements | ) |
Adds elements to the set.
elements | Elements to add. |
bool KS.Reactor.ksHashSet< T >.Add | ( | T | element | ) |
Adds an element to the set if it is not already in the set.
element | Element to add. |
void KS.Reactor.ksHashSet< T >.Clear | ( | ) |
Clears the set.
bool KS.Reactor.ksHashSet< T >.Contains | ( | T | element | ) |
Checks if the set contains an element?
element | Element to check for. |
bool KS.Reactor.ksHashSet< T >.ContainsAll | ( | IEnumerable< T > | elements | ) |
Checks if the set contains all of the given elements.
elements | Elements to check for. |
bool KS.Reactor.ksHashSet< T >.ContainsAll | ( | params T[] | elements | ) |
Checks if the set contains all of the given elements.
elements | Elements to check for. |
bool KS.Reactor.ksHashSet< T >.ContainsAny | ( | IEnumerable< T > | elements | ) |
Checks if the set contains any of the given elements.
elements | Elements to check for. |
bool KS.Reactor.ksHashSet< T >.ContainsAny | ( | params T[] | elements | ) |
Checks if the set contains any of the given elements.
elements | Elements to check for. |
void KS.Reactor.ksHashSet< T >.CopyTo | ( | T[] | array, |
int | arrayIndex | ||
) |
Copies the set elements into an array.
array | Array to copy elements into. |
arrayIndex | Array index to start copying to. |
HashSet<T>.Enumerator KS.Reactor.ksHashSet< T >.GetEnumerator | ( | ) |
Gets the enumerator.
delegate void KS.Reactor.ksHashSet< T >.ModifyHandler | ( | ksHashSet< T > | set | ) |
Set that was modified.
set |
void KS.Reactor.ksHashSet< T >.Remove | ( | IEnumerable< T > | elements | ) |
Removes elements from the set.
elements | Elements to remove. |
void KS.Reactor.ksHashSet< T >.Remove | ( | params T[] | elements | ) |
Removes elements from the set.
elements | Elements to remove. |
bool KS.Reactor.ksHashSet< T >.Remove | ( | T | element | ) |
Removes an element from the set.
element | Element to remove. |
void KS.Reactor.ksHashSet< T >.Set | ( | IEnumerable< T > | elements | ) |
Clears the set and adds the given elements.
elements |
void KS.Reactor.ksHashSet< T >.Set | ( | params T[] | elements | ) |
Clears the set and adds the given elements.
elements |
ModifyHandler KS.Reactor.ksHashSet< T >.OnModify |
Invoked when the hash set is modified.
|
get |
The number of elements in the set.
|
get |
Is this collection read-only? Always false.