I think the fix is to move this to a private field on AvlTreeSet, which will be possible if TreeIterator becomes AvlTreeIterator, and the iterator and reversed getters are abstract on TreeSet.