/// <summary> /// Cria um clone com os dados da instancia. /// </summary> /// <returns></returns> public object Clone() { SRTree tree = new SRTree(); if (this.LeftList != null) { tree.LeftList = this.LeftList.Clone() as ArrayList; } if (this.RightList != null) { tree.RightList = this.RightList.Clone() as ArrayList; } return(tree); }
/// <summary> /// Realiza o um merge com a árvore informada. /// </summary> /// <param name="tree"></param> public void Merge(SRTree tree) { if (tree == null) { tree = new SRTree(); } if (tree.RightList == null) { tree.RightList = new ArrayList(); } if (this.RightList != null) { IEnumerator enumerator = this.RightList.GetEnumerator(); while (enumerator.MoveNext()) { if (!tree.RightList.Contains(enumerator.Current)) { tree.RightList.Add(enumerator.Current); } } } }