Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iteration

 
Hunter McMillen
Ranch Hand
Posts: 492
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Clapham
Sheriff
Posts: 21316
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since it's a private member of the SymbolTable class, any code which works with it would have to be inside the SymbolTable class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic