/// <summary> /// Answers a new instance of ChoiceFormat with the same ranges and strings /// as this ChoiceFormat. /// </summary> /// /// <returns>a shallow copy of this ChoiceFormat</returns> /// <seealso cref="T:System.ICloneable"/> public override Object Clone() { ChoiceFormat clone = (ChoiceFormat)base.Clone(); clone.choiceLimits = (double[])choiceLimits.Clone(); clone.choiceFormats = (string[])choiceFormats.Clone(); return(clone); }
/// <summary> /// Compares the specified object to this ChoiceFormat and answer if they are /// equal. The object must be an instance of ChoiceFormat and have the same /// limits and formats. /// </summary> /// /// <param name="object">the object to compare with this object</param> /// <returns>true if the specified object is equal to this ChoiceFormat, false /// otherwise</returns> /// <seealso cref="M:ILOG.J2CsMapping.Text2.ChoiceFormat.HashCode"/> public override bool Equals(Object obj0) { if ((Object)this == obj0) { return(true); } if (!(obj0 is ChoiceFormat)) { return(false); } ChoiceFormat choice = (ChoiceFormat)obj0; return(ILOG.J2CsMapping.Collections.Arrays.Equals(choiceLimits, choice.choiceLimits) && ILOG.J2CsMapping.Collections.Arrays.Equals(choiceFormats, choice.choiceFormats)); }