contains Method added to the AVL tree.