public override bool RemoveAll(ICollection <E> collection) { bool result = false; if (Count <= collection.Count) { IIterator <E> it = Iterator(); while (it.HasNext()) { if (collection.Contains(it.Next())) { it.Remove(); result = true; } } } else { foreach (E e in collection) { result = Remove(e) || result; } } return(result); }
public override int GetHashCode() { int result = 0; IIterator <E> it = Iterator(); while (it.HasNext()) { Object next = it.Next(); result += next == null ? 0 : next.GetHashCode(); } return(result); }
public bool HasNext() { return(setIterator.HasNext()); }