my dog learned polymorphism
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 19750

Since it's a private member of the SymbolTable class, any code which works with it would have to be inside the SymbolTable class.
I agree. Here's the link:
subject: Iteration
jQuery in Action, 3rd edition