This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Java in General and the fly likes Iteration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Iteration" Watch "Iteration" New topic


Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

Hey everyone,

I am trying to iterate of a Hashtable that is full of TableEntry objects. I am attempting to do this from a class outside the TableEntry class which is private and final, So I am running into the issue of not be able to create an Iterator of that type i.e:

Is there any way I can iterate over my collection without having access to this class? some way to cast the Iterator?

Here are the two classes:

Sorry for the long post.

Hunter McMillen

"If the facts don't fit the theory, get new facts" --Albert Einstein
Paul Clapham

Joined: Oct 14, 2005
Posts: 19693

Since it's a private member of the SymbolTable class, any code which works with it would have to be inside the SymbolTable class.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Iteration
It's not a secret anymore!