File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Enumeration Question" Watch "Enumeration Question" New topic

Enumeration Question

John Lincoln
Ranch Hand

Joined: Feb 11, 2003
Posts: 192

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

Joined: Jan 10, 2002
Posts: 63548

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

[Asking smart questions] [About Bear] [Books by Bear]
Jim Yingst

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
I agree. Here's the link:
subject: Enumeration Question
It's not a secret anymore!