This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


JavaRanch » Java Forums » Java » Java in General
Bookmark "Iteration" Watch "Iteration" New topic
Author

Iteration

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.

Thanks,
Hunter McMillen

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

Joined: Oct 14, 2005
Posts: 18570
    
    8

Since it's a private member of the SymbolTable class, any code which works with it would have to be inside the SymbolTable class.
 
GeeCON Prague 2014
 
subject: Iteration