Ejemplo n.º 1
0
 public virtual bool ElmentI(T element)
 {
     if (root == null)
     {
         root = new TreeBANode <T>(element, rootSize);
         root.initializeChild();
         return(true);
     }
     else
     {
         TreeBANode <T> nodeToInsertInto = FTInsert(element);
         if (SpacesLNode(nodeToInsertInto) == 0)
         {
             if (FTInsert(element) == root)
             {
                 return(SRInsert(element));
             }
             else
             {
                 if (SHSpace(nodeToInsertInto))
                 {
                     return(ReOElementI(element, nodeToInsertInto));
                 }
                 else
                 {
                     return(SNInsert(FTInsert(element), element));
                 }
             }
         }
         else
         {
             return(Insert(FTInsert(element), element));
         }
     }
 }