1-Relational Database/1-Relational DB Concepts/B-Tree & B+ Tree/java/BPlusTree.java
/**
     * Helper method to locate the given key in the given subtree recursively.
     * @param curr current not
     * @param key key to search for
     */
Helper method to locate the given key in the given subtree recursively.
@param curr current not
@param key key to search for
Helper method to locate the given key in the given subtree recursively . @param curr current not @param key key to search for
private void locateLeafAndPos(Node curr, int key) {
        int pos = curr.findInsertPos(key);
        if (curr.isLeaf()) { 
            leaf = (BPlusTreeLeaf) curr;
            leafPos = pos;
            return;
        }
        locateLeafAndPos(curr.getChild(pos), key);
    }
private void locateLeafAndPos ( Node curr , int key ) { int pos = curr . findInsertPos ( key ) ; if ( curr . isLeaf ( ) ) { leaf = ( BPlusTreeLeaf ) curr ; leafPos = pos ; return ; } locateLeafAndPos ( curr . getChild ( pos ) , key ) ; }
Helper method to locate the given key in the given subtree recursively.
Helper method to locate the given key in the given subtree recursively .
// Leaf // Non-leaf // Go to the appropriate child