BTNode node = new BTNode(nodeRecord); BTNode succ = node.getChild(keyIndexInNode + 1); if (succ != null && succ.keyCount > this.minRecords) { node.makeWritable(); BTNode pred = node.getChild(keyIndexInNode); if (pred != null && pred.keyCount > this.minRecords) { node.makeWritable(); succ.makeWritable(); node.makeWritable(); pred.makeWritable(); mergeNodes(succ, node, keyIndexInNode, pred); return deleteImp(key, pred.node, mode); BTNode child = node.getChild(subtreeIndex); if (child == null) { throw new IndexException(new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, IStatus.OK, return deleteImp(key, child.node, mode); } else { child.makeWritable(); node.makeWritable(); BTNode sibR = node.getChild(subtreeIndex + 1); if (sibR != null && sibR.keyCount > this.minRecords) { sibR.makeWritable(); BTNode sibL = node.getChild(subtreeIndex - 1);
BTNode node = new BTNode(nodeRecord); BTNode succ = node.getChild(keyIndexInNode + 1); if (succ != null && succ.keyCount > this.minRecords) { node.makeWritable(); BTNode pred = node.getChild(keyIndexInNode); if (pred != null && pred.keyCount > this.minRecords) { node.makeWritable(); succ.makeWritable(); node.makeWritable(); pred.makeWritable(); mergeNodes(succ, node, keyIndexInNode, pred); return deleteImp(key, pred.node, mode); BTNode child = node.getChild(subtreeIndex); if (child == null) { throw new IndexException(new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, IStatus.OK, return deleteImp(key, child.node, mode); } else { child.makeWritable(); node.makeWritable(); BTNode sibR = node.getChild(subtreeIndex + 1); if (sibR != null && sibR.keyCount > this.minRecords) { sibR.makeWritable(); BTNode sibL = node.getChild(subtreeIndex - 1);
BTNode getChild(int index) throws IndexException { if (0 <= index && index < BTree.this.maxChildren) { long child = BTree.this.getChild(this.chunk, this.node, index); if (child != 0) return new BTNode(child); } return null; }
BTNode getChild(int index) throws IndexException { if (0 <= index && index < BTree.this.maxChildren) { long child = BTree.this.getChild(this.chunk, this.node, index); if (child != 0) return new BTNode(child); } return null; }