File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data representation for Hashtable where key is unknown

 
Richard Robbins
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am implementing an application wherein a thread is given access to an object that represents a list of Hashtable-like objects, except that the thread doesn't know what keys (or how may there are) exist in the Hashtable. Is there another data representation available which would allow me to find the next element available as well as the value associated with that element?
Thanks,
Richard
 
Aj Manch
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HashTable has .keys() which returns an Enumeration of keys in the hashtable and .elements() which returns an Enumeration of elements in the hashtable. Is that what you are looking for?
AJ
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic