This seems to be the only place that TreeNode is exposed on the public API of TreeSet. Should this be private (or removed)? If it's public then we have to think about what the public vs private APIs of TreeNode and AvlNode are.