Enumerator class to assist the TreeNode implementation