Esempio n. 1
0
 /// <summary>
 /// Creates set from another set
 /// </summary>
 /// <param name="set"></param>
 public CustomSet(CustomSet <T> set)
 {
     Collection = new CustomCollection <T>(set.Collection);
 }
Esempio n. 2
0
 public CustomSet(IEnumerable <T> elements) : this()
 {
     Collection = new CustomCollection <T>(elements.ToArray());
 }
Esempio n. 3
0
 /// <summary>
 /// Creates set with specified size
 /// </summary>
 /// <param name="size"></param>
 public CustomSet(int size = 0)
 {
     Collection = new CustomCollection <T>(size);
 }
 public void Clear() => collection = new CustomCollection <T>(Size);
Esempio n. 5
0
 public CustomCollection(CustomCollection <T> collection) : this(collection.elements)
 {
     end = collection.Count;
 }
Esempio n. 6
0
 protected bool Equals(CustomCollection <T> other)
 {
     return(Equals(elements, other.elements) && end == other.end && pointer == other.pointer && IsReadOnly == other.IsReadOnly);
 }