/// <summary> /// Overrides Cloneable /// </summary> public override Object Clone() { ChoiceFormat other = (ChoiceFormat)base.Clone(); // for primitives or immutables, shallow clone is enough other.ChoiceLimits = ChoiceLimits.clone(); other.ChoiceFormats = ChoiceFormats.clone(); return(other); }
/// <summary> /// Equality comparision between two /// </summary> public override bool Equals(Object obj) { if (obj == null) { return(false); } if (this == obj) // quick check { return(true); } if (this.GetType() != obj.GetType()) { return(false); } ChoiceFormat other = (ChoiceFormat)obj; return(Arrays.Equals(ChoiceLimits, other.ChoiceLimits) && Arrays.Equals(ChoiceFormats, other.ChoiceFormats)); }