Catrobat.IDE.Core.Xml.XmlObjects.Formulas.XmlFormulaTree.Equals C# (CSharp) Method

Equals() public method

public Equals ( XmlFormulaTree t ) : bool
t XmlFormulaTree
return bool
        public bool Equals(XmlFormulaTree t)
        {
            bool type = this.VariableType.Equals(t.VariableType);
            bool value = this.VariableValue.Equals(t.VariableValue);
            bool left = false;
            if ((this.LeftChild == null) && (t.LeftChild == null))
                left = true;
            else if ((this.LeftChild != null) && (t.LeftChild != null))
                left = this.LeftChild.Equals(t.LeftChild);
            else left = false;

            bool right = false;
            if ((this.RightChild == null) && (t.RightChild == null))
                right = true;
            else if ((this.RightChild != null) && (t.RightChild != null))
                right = this.RightChild.Equals(t.RightChild);
            else right = false;

            return type && value && left && right;
        }

Same methods

XmlFormulaTree::Equals ( System obj ) : bool