コード例 #1
0
ファイル: deletingState.cs プロジェクト: esedakov/binTreeDemo
 /// <summary>
 /// construct deleting state
 /// </summary>
 /// <param name="key">key that points at the deleted node</param>
 /// <param name="deletedNode">node to be deleted</param>
 /// <param name="searchedNode">currently traversed/searched node</param>
 /// <param name="replacementNode">node that intends to replace deleted node</param>
 public deletingState(Object key, node deletedNode = null, node searchedNode = null, node replacementNode = null)
 {
     //assign fields
     this._key         = key;
     this._del         = deletedNode;
     this._searched    = searchedNode;
     this._replacement = replacementNode;
 }
コード例 #2
0
        }   //end function 'replaceChildWithAnotherNode'

        /// <summary>
        /// replace this node's information with another node's information
        /// </summary>
        /// <param name="another">another node, which is going to replace this node</param>
        public void replaceNodeInformationWithAnotherNode(node another)
        {
            //assign key
            this._key = another._key;
        }