Exemplo n.º 1
0
 /** Inserts the specific node to this tree. */
 public boolean insertNode(int index, DEPNode node) {
   try {
     add(index, node);
     reassignIDs(index);
     return true;
   } catch (IndexOutOfBoundsException e) {
     e.printStackTrace();
     return false;
   }
 }
Exemplo n.º 2
0
 /** Removes the specific node from this tree. */
 public boolean removeNode(int index) {
   try {
     remove(index);
     reassignIDs(index);
     return true;
   } catch (IndexOutOfBoundsException e) {
     e.printStackTrace();
     return false;
   }
 }