A collection that contains no duplicate elements.
Namespace: Iesi.CollectionsAssembly: Iesi.Collections (in Iesi.Collections.dll) Version: 1.0.1.0 (3.2.0.4000)
Syntax
| C# |
|---|
[SerializableAttribute] public abstract class Set : ISet, ICollection, IEnumerable, ICloneable |
| Visual Basic |
|---|
<SerializableAttribute> _ Public MustInherit Class Set _ Implements ISet, ICollection, IEnumerable, ICloneable |
| Visual C++ |
|---|
[SerializableAttribute] public ref class Set abstract : ISet, ICollection, IEnumerable, ICloneable |
Remarks
This class models the mathematical set abstraction, and is the base class for all other set implementations. The order of elements in a set is dependant on (a) the data-structure implementation, and (b) the implementation of the various methods, and thus is not guaranteed.
None of the ISet implementations in this library are guranteed to be thread-safe in any way unless wrapped in a SynchronizedSet.
The following table summarizes the binary operators that are supported by the ISet type.
| Operation | Description | Method | Operator |
|---|---|---|---|
| Union (OR) | Element included in result if it exists in either A OR B. | Union() | | |
| Intersection (AND) | Element included in result if it exists in both A AND B. | InterSect() | & |
| Exclusive Or (XOR) | Element included in result if it exists in one, but not both, of A and B. | ExclusiveOr() | ^ |
| Minus (n/a) | Take all the elements in A. Now, if any of them exist in B, remove them. Note that unlike the other operators, A - B is not the same as B - A. | Minus() | - |
Inheritance Hierarchy
System..::..Object
Iesi.Collections..::..Set
Iesi.Collections..::..DictionarySet
Iesi.Collections..::..ImmutableSet
Iesi.Collections..::..SynchronizedSet
NHibernate.Util..::..IdentitySet
Iesi.Collections..::..Set
Iesi.Collections..::..DictionarySet
Iesi.Collections..::..ImmutableSet
Iesi.Collections..::..SynchronizedSet
NHibernate.Util..::..IdentitySet