Java implementation of AVL tree