1-Relational Database/1-Relational DB Concepts/B-Tree & B+ Tree/java/common_constructs/Node.java
/**
     * Inserts the given key-record mapping into this node, at the given
     * position, with the given left and right children.
     * @param pos insert position
     * @param entry index entry to insert
     * @param leftChild left child to insert
     * @param rightChild right child to insert
     */
Inserts the given key-record mapping into this node, at the given
position, with the given left and right children.
@param pos insert position
@param entry index entry to insert
@param leftChild left child to insert
@param rightChild right child to insert
Inserts the given key - record mapping into this node at the given position with the given left and right children . @param pos insert position @param entry index entry to insert @param leftChild left child to insert @param rightChild right child to insert
public void insertEntry(int pos, Entry entry, Node leftChild, Node rightChild) {
        int copyLength = size - pos;
        System.arraycopy(entries, pos, entries, pos + 1, copyLength);
        entries[pos] = entry;
        ++size;
        System.arraycopy(children, pos + 1, children, pos + 2, copyLength);
        children[pos] = leftChild;
        children[pos + 1] = rightChild;
    }
public void insertEntry ( int pos , Entry entry , Node leftChild , Node rightChild ) { int copyLength = size - pos ; System . arraycopy ( entries , pos , entries , pos + 1 , copyLength ) ; entries [ pos ] = entry ; ++ size ; System . arraycopy ( children , pos + 1 , children , pos + 2 , copyLength ) ; children [ pos ] = leftChild ; children [ pos + 1 ] = rightChild ; }
Inserts the given key-record mapping into this node, at the given
 position, with the given left and right children.
Inserts the given key - record mapping into this node at the given position with the given left and right children .
// Handle the entries // Handle the children