/** * Insert the key and (its predecessor) child at the left side of the specified node. Bounds checking * is not performed. * @param node the node to prepend to * @param key the new leftmost (least) key * @param child the new leftmost (least) subtree root */ private void prepend(BTNode node, long key, long child) { nodeContentCopy(node, 0, node, 1, node.keyCount + 1); putRecord(node.chunk, node.node, 0, key); putChild(node.chunk, node.node, 0, child); }
/** * Insert the key and (its predecessor) child at the left side of the specified node. Bounds checking * is not performed. * @param node the node to prepend to * @param key the new leftmost (least) key * @param child the new leftmost (least) subtree root */ private void prepend(BTNode node, long key, long child) { nodeContentCopy(node, 0, node, 1, node.keyCount + 1); putRecord(node.chunk, node.node, 0, key); putChild(node.chunk, node.node, 0, child); }
nodeContentCopy(src, 0, dst, dst.keyCount + 1, src.keyCount + 1); long midKey = getRecord(keyProvider.chunk, keyProvider.node, kIndex); putRecord(dst.chunk, dst.node, dst.keyCount, midKey);
nodeContentCopy(src, 0, dst, dst.keyCount + 1, src.keyCount + 1); long midKey = getRecord(keyProvider.chunk, keyProvider.node, kIndex); putRecord(dst.chunk, dst.node, dst.keyCount, midKey);