File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JavaFX and the fly likes Store an object in a hash value? 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 » JavaFX
Bookmark "Store an object in a hash value?" Watch "Store an object in a hash value?" New topic
Author

Store an object in a hash value?

Ali Abedi
Greenhorn

Joined: Oct 28, 2009
Posts: 1
I want to store a series of objects in a key/value format. I tried using a HashMap but all I get back are NULLS so I'm assuming the object isn't being stored. Is there a way I can store objects in a key/value format?
Thanks!
Philippe Lhoste
Greenhorn

Joined: Oct 23, 2009
Posts: 28
Same answer than in Store Object in key/value format thread in Sun forums: show what you try to do. At least a significant running small sample.
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
If you are using your own object as a key then you should override equals and hashcoe method.


SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Store an object in a hash value?
 
Similar Threads
Is there a concept of Map in javascript
[JSF 2.0] f:selectItems with custom class
HashMap
Regarding java.util.List
Difference in HashMap and HashSet