/** 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; } }
/** 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; } }