class GHLongIntBTree implements LongIntMap {

    @Override
    public int put(long key, int value) {
        if (key == noNumberValue) {
            throw new IllegalArgumentException("Illegal key " + key);
        }

        ReturnValue rv = root.put(key, value);
        if (rv.tree != null) {
            height++;
            root = rv.tree;
        }
        if (rv.oldValue == noNumberValue) {
            // successfully inserted
            size++;
            if (size % 1000000 == 0)
                optimize();
        }
        return rv.oldValue;
    }

    public  GHLongIntBTree(int maxLeafEntries);

}