wood burning stoves 2.0*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 18110
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iteration
 
Similar Threads
ClassCastException
JTable help
significance of private with final modifier method
save properties file without affecting existing comments.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1