Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Enumeration Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Enumeration Question" Watch "Enumeration Question" New topic
Author

Enumeration Question

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192
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

Joined: Jan 10, 2002
Posts: 60785
    
  65

Please reserve this forum for questions on advanced Java. I have moved this post to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
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?


"I'm not back." - Bill Harding, Twister
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Enumeration Question
 
Similar Threads
how to retieve the keys and values from a propertyfile in an order
Invalid state for getResultSet
about enumeration of hashtable
plz clear my doubt...
castNotSupportedException