Determine if tree is AVL in O(n)

The following java method will determine if a binary tree is AVL (and, obviously BST)