Type Parameters
- T
Implements a Set based on a Dictionary (which is equivalent of
non-genric HashTable) This will give the best lookup, add, and remove
performance for very large data-sets, but iteration will occur in no particular order.
The following tables list the members exposed by the HashedSet<(Of T>) generic type.
Public Methods
| Name | Description | |
|---|---|---|
| Add |
Adds the specified element to this set if it is not already present.
Adds the specified element to this set if it is not already present.
(Inherited from DictionarySet<(Of T>).) | |
| AddAll |
Adds all the elements in the specified collection to the set if they are not already present.
Adds all the elements in the specified collection to the set if they are not already present.
(Inherited from DictionarySet<(Of T>).) | |
| Clear |
Removes all objects from the set.
Removes all objects from the set.
(Inherited from DictionarySet<(Of T>).) | |
| Clone |
Returns a clone of the Set instance. This will work for derived Set
classes if the derived class implements a constructor that takes no arguments.
Returns a clone of the Set instance. This will work for derived Set
classes if the derived class implements a constructor that takes no arguments.
(Inherited from Set<(Of T>).) | |
| Contains |
Returns trueTruetrue if this set contains the specified element.
Returns trueTruetrue if this set contains the specified element.
(Inherited from DictionarySet<(Of T>).) | |
| ContainsAll |
Returns trueTruetrue if the set contains all the elements in the specified collection.
Returns trueTruetrue if the set contains all the elements in the specified collection.
(Inherited from DictionarySet<(Of T>).) | |
| CopyTo |
Copies the elements in the Set to an array of T. The type of array needs
to be compatible with the objects in the Set, obviously.
Copies the elements in the Set to an array of T. The type of array needs
to be compatible with the objects in the Set, obviously.
(Inherited from DictionarySet<(Of T>).) | |
| ExclusiveOr |
Performs an "exclusive-or" of the two sets, keeping only the elements that
are in one of the sets, but not in both. The original sets are not modified
during this operation. The result set is a Clone() of this set containing
the elements from the exclusive-or operation.
(Inherited from Set<(Of T>).) | |
| GetEnumerator |
Gets an enumerator for the elements in the Set.
Gets an enumerator for the elements in the Set.
(Inherited from DictionarySet<(Of T>).) | |
| Intersect |
Performs an "intersection" of the two sets, where only the elements
that are present in both sets remain. That is, the element is included if it exists in
both sets. The Intersect() operation does not modify the input sets. It returns
a Clone() of this set with the appropriate elements removed.
(Inherited from Set<(Of T>).) | |
| Minus |
Performs a "minus" of set b from set a. This returns a set of all
the elements in set a, removing the elements that are also in set b.
The original sets are not modified during this operation. The result set is a Clone()
of this Set containing the elements from the operation.
(Inherited from Set<(Of T>).) | |
| Remove |
Removes the specified element from the set.
Removes the specified element from the set.
(Inherited from DictionarySet<(Of T>).) | |
| RemoveAll |
Remove all the specified elements from this set, if they exist in this set.
Remove all the specified elements from this set, if they exist in this set.
(Inherited from DictionarySet<(Of T>).) | |
| RetainAll |
Retains only the elements in this set that are contained in the specified collection.
Retains only the elements in this set that are contained in the specified collection.
(Inherited from DictionarySet<(Of T>).) | |
| Union |
Performs a "union" of the two sets, where all the elements
in both sets are present. That is, the element is included if it is in either a or b.
Neither this set nor the input set are modified during the operation. The return value
is a Clone() of this set with the extra elements added in.
(Inherited from Set<(Of T>).) |
Protected Methods
| Name | Description | |
|---|---|---|
| NonGenericCopyTo |
Copies the elements in the Set to an array. The type of array needs
to be compatible with the objects in the Set, obviously. Needed for
non-generic ISet methods implementation
Copies the elements in the Set to an array. The type of array needs
to be compatible with the objects in the Set, obviously. Needed for
non-generic ISet methods implementation
(Inherited from DictionarySet<(Of T>).) | |
| NonGenericExclusiveOr |
Performs ExclusiveOr when called trhough non-generic ISet interface
Performs ExclusiveOr when called trhough non-generic ISet interface
(Inherited from Set<(Of T>).) | |
| NonGenericIntersect |
Performs Intersect when called trhough non-generic ISet interface
Performs Intersect when called trhough non-generic ISet interface
(Inherited from Set<(Of T>).) | |
| NonGenericMinus |
Performs Minus when called trhough non-generic ISet interface
Performs Minus when called trhough non-generic ISet interface
(Inherited from Set<(Of T>).) | |
| NonGenericUnion |
Performs Union when called trhough non-generic ISet interface
Performs Union when called trhough non-generic ISet interface
(Inherited from Set<(Of T>).) |
Protected Fields
| Name | Description | |
|---|---|---|
| InternalDictionary |
Provides the storage for elements in the Set, stored as the key-set
of the IDictionary object. Set this object in the constructor
if you create your own Set class.
Provides the storage for elements in the Set, stored as the key-set
of the IDictionary object. Set this object in the constructor
if you create your own Set class.
(Inherited from DictionarySet<(Of T>).) |
Public Constructors
| Name | Description | |
|---|---|---|
| HashedSet<(Of T>)New | Overloaded. |
Public Properties
| Name | Description | |
|---|---|---|
| Count |
The number of elements contained in this collection.
The number of elements contained in this collection.
(Inherited from DictionarySet<(Of T>).) | |
| IsEmpty |
Returns trueTruetrue if this set contains no elements.
Returns trueTruetrue if this set contains no elements.
(Inherited from DictionarySet<(Of T>).) | |
| IsReadOnly |
Indicates wether the Set is read-only or not
Indicates wether the Set is read-only or not
(Inherited from DictionarySet<(Of T>).) | |
| IsSynchronized |
None of the objects based on DictionarySet are synchronized. Use the
SyncRoot property instead.
None of the objects based on DictionarySet are synchronized. Use the
SyncRoot property instead.
(Inherited from DictionarySet<(Of T>).) | |
| SyncRoot |
Returns an object that can be used to synchronize the Set between threads.
Returns an object that can be used to synchronize the Set between threads.
(Inherited from DictionarySet<(Of T>).) |
Protected Properties
| Name | Description | |
|---|---|---|
| Placeholder |
The placeholder object used as the value for the IDictionary instance.
The placeholder object used as the value for the IDictionary instance.
(Inherited from DictionarySet<(Of T>).) |