public bool Equals(FrozenIntSet other) { if (other == null) { return(false); } if (HashCode_Renamed != other.HashCode_Renamed) { return(false); } if (other.Values.Length != Upto) { return(false); } for (int i = 0; i < Upto; i++) { if (other.Values[i] != Values[i]) { return(false); } } return(true); }
public override bool Equals(object _other) { throw new NotImplementedException("ObjectEquals"); if (_other == null) { return(false); } if (!(_other is FrozenIntSet)) { return(false); } FrozenIntSet other = (FrozenIntSet)_other; if (HashCode_Renamed != other.HashCode_Renamed) { return(false); } if (other.Values.Length != Upto) { return(false); } for (int i = 0; i < Upto; i++) { if (other.Values[i] != Values[i]) { return(false); } } return(true); }
public override bool Equals(object _other) { throw new NotImplementedException(); if (_other == null) { return(false); } if (_other is FrozenIntSet) { FrozenIntSet other = (FrozenIntSet)_other; if (HashCode_Renamed != other.HashCode_Renamed) { return(false); } if (other.Values.Length != Values.Length) { return(false); } for (int i = 0; i < Values.Length; i++) { if (other.Values[i] != Values[i]) { return(false); } } return(true); } else if (_other is SortedIntSet) { SortedIntSet other = (SortedIntSet)_other; if (HashCode_Renamed != other.HashCode_Renamed) { return(false); } if (other.Values.Length != Values.Length) { return(false); } for (int i = 0; i < Values.Length; i++) { if (other.Values[i] != Values[i]) { return(false); } } return(true); } return(false); }