• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enumeration Question

 
John Lincoln
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have class which implements Enumeration interface.


It prints all the elements (there are 3 elements)

But with the following code



The function gets called only once (for one element) ? What is wrong with the above ?

thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please reserve this forum for questions on advanced Java. I have moved this post to a more appropriate forum.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Offhand the most likely guess is that children() and breadthFirstEnumeration() return different enumerations. Maybe children() returns only immediate children, and breadthFirstEnumeration() returns grandchildren, etc. as well? Are these two methods supposed to return the same enumeration, or not?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic