public static HashList <T> Union(HashList <T> ha1, HashList <T> ha2) { HashList <T> result = new HashList <T>(); result.AddAll(ha1); result.AddAll(ha2); return(result); }
public static HashList <T> Difference(HashList <T> ha1, HashList <T> ha2) { HashList <T> result = new HashList <T>(); foreach (T x in ha1.Where(x => !ha2.Contains(x))) { result.Add(x); } return(result); }
public static HashList <T> Intersection(HashList <T> ha1, HashList <T> ha2) { HashList <T> result = new HashList <T>(); foreach (var x in ha1.Where(ha2.Contains)) { result.Add(x); } return(result); }
public bool UnsequencedEquals(HashList <T> that) { return(Count == that.Count && seq.All(x => that.set.Contains(x))); }