Exemple #1
0
        /// <summary>
        /// Detaches this node from it's parent.
        /// Postcondition: this is a root node.
        /// </summary>
        /// <returns></returns>
        public DTreeNode <T> Detach()
        {
            if (mParent != null)
            {
                Siblings.Remove(this);
            }

            return(this);
        }
Exemple #2
0
        /// <summary>
        /// Detaches this node from it's parent.
        /// Postcondition: this is a root node.
        /// </summary>
        /// <returns></returns>
        public T Detach()
        {
            if (_parent != null)
            {
                Siblings.Remove((T)this);
            }

            return((T)this);
        }
Exemple #3
0
 private void RemoveSibling(Person person)
 {
     Siblings.Remove(person);
 }