File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Data representation for Hashtable where key is unknown 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 "Data representation for Hashtable where key is unknown" Watch "Data representation for Hashtable where key is unknown" New topic
Author

Data representation for Hashtable where key is unknown

Richard Robbins
Ranch Hand

Joined: Mar 07, 2001
Posts: 66
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


Richard Robbins is one of the founders of WebsiteTemplateDatabase.com, a resource for free website templates and Photoshop tutorials. He also consults for an online boutique selling baptism dresses and christening gowns.
Aj Manch
Ranch Hand

Joined: May 07, 2001
Posts: 50
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Data representation for Hashtable where key is unknown
 
Similar Threads
What's the suitable Data structure
Error while loading list by specified index
log4j and large string buffers
HashMapDefinition
Urgent!! How to sort an ArrayList of HashtableSorting