public override bool Equals(Object o) { if (this == o) { return(true); } if (o == null || GetType() != o.GetType()) { return(false); } State state = (State)o; if (isFinal != state.isFinal) { return(false); } if (arcs != null && state.arcs != null) { if (!ArrayHelper.AreEqual(arcs, state.arcs)) { return(false); } } else if ((arcs != null && state.arcs == null) || (arcs == null && state.arcs != null)) { return(false); } return(true); }
/// <summary> /// Determines whether the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>. /// </summary> /// <param name="other">The <see cref="T:System.Object"></see> to compare with the current <see cref="T:System.Object"></see>.</param> /// <returns> /// true if the specified <see cref="T:System.Object"></see> is equal to the current <see cref="T:System.Object"></see>; otherwise, false. /// </returns> public override bool Equals(Object other) { if (other == this) { return(true); } if (other is MultiKey <T> ) { MultiKey <T> otherKeys = (MultiKey <T>)other; return(ArrayHelper.AreEqual(_keys, otherKeys._keys)); } return(false); }