示例#1
0
 /// <summary>
 /// Removes all objects from the set.
 /// </summary>
 public void Clear()
 {
     _tree  = new RbTree(_comparer);
     _count = 0;
 }
示例#2
0
 /// <summary>
 /// Creates an instance of SetBase.
 /// </summary>
 /// <param name="comparer">Comparer that specifies sort order of the elements.</param>
 /// <param name="allowDuplicates">Whether multiple duplicate (equivalent) elements are allowed.</param>
 public SetBase(System.Collections.IComparer comparer, bool allowDuplicates)
 {
     _comparer        = comparer;
     _allowDuplicates = allowDuplicates;
     _tree            = new RbTree(_comparer);
 }