public ForAllFormula(ForAllFormula another) { Atom refAtom = null; ForAll refForall = null; Implies refImplies = null; Equivalent refEquivalent = null; try { if (another.Atom != null) { refAtom = (Atom)another.Atom.Clone(); } if (another.Equivalent != null) { refEquivalent = (Equivalent)another.Equivalent.Clone(); } if (another.Implies != null) { refImplies = (Implies)another.Implies.Clone(); } if (another.InnerForAll != null) { refForall = (ForAll)another.InnerForAll.Clone(); } } catch (Exception e) { e.ToString(); } atom = refAtom; imp = refImplies; forall = refForall; eq = refEquivalent; }
public ForAll(ForAll another) { Oid refOid = null; ForAllFormula refForallformula = null; declare = new ArrayList(); try { if (another.Oid != null) { refOid = (Oid)another.Oid.Clone(); } if (another.Formula != null) { refForallformula = (ForAllFormula)another.Formula.Clone(); } if (another.Declare != null) { Declare[] items = (Declare[])another.Declare.Clone(); declare.Clear(); foreach (Declare item in items) { declare.Add(new Declare(item)); } } } catch (Exception e) { e.ToString(); } oid = refOid; formula = refForallformula; }
public override bool Equals(object o) { if (o == null || GetType() != o.GetType()) { return false; } ForAll other = new ForAll((ForAll)o); if (this.oid != null) { if (!this.Oid.Equals(other.Oid)) { return false; } } if (this.Formula != null) { if (!this.Formula.Equals(other.Formula)) { return false; } } if (Declare.Length != other.Declare.Length) { return false; } for (int i = 0; i < Declare.Length; i++) { if (!Declare[i].Equals(other.Declare[i])) { return false; } } return true; }