public bool Equals(FrozenInt32Set other) // LUCENENET TODO: This didn't exist in the original { if (other == null) { return(false); } if (hashCode != other.hashCode) { 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) { if (other == null) { return(false); } if (!(other is FrozenInt32Set)) { return(false); } FrozenInt32Set other2 = (FrozenInt32Set)other; if (hashCode != other2.hashCode) { return(false); } if (other2.values.Length != upto) { return(false); } for (int i = 0; i < upto; i++) { if (other2.values[i] != values[i]) { return(false); } } return(true); }
public override bool Equals(object other) { if (other == null) { return(false); } if (other is FrozenInt32Set) { FrozenInt32Set other2 = (FrozenInt32Set)other; if (hashCode != other2.hashCode) { return(false); } if (other2.values.Length != values.Length) { return(false); } for (int i = 0; i < values.Length; i++) { if (other2.values[i] != values[i]) { return(false); } } return(true); } else if (other is SortedInt32Set) { SortedInt32Set other3 = (SortedInt32Set)other; if (hashCode != other3.hashCode) { return(false); } if (other3.values.Length != values.Length) { return(false); } for (int i = 0; i < values.Length; i++) { if (other3.values[i] != values[i]) { return(false); } } return(true); } return(false); }