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 hello ranchers, how do I use Map.SimpleEntry to store and return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "hello ranchers, how do I use Map.SimpleEntry to store and return" Watch "hello ranchers, how do I use Map.SimpleEntry to store and return" New topic
Author

hello ranchers, how do I use Map.SimpleEntry to store and return

ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29



Please tell me how can I store and Iterate this map
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Where exactly does class SimpleEntry come from? It's not a class from the standard Java API.

What exactly do you want to do? Store 'map' into 'mapiRamAsset' under a specific key? You'd have to create a SimpleEntry to use as the key first. I can't tell you how to do that, because I don't know what class SimpleEntry is. Then you use 'put' to store the map:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29



http://docs.oracle.com/javase/7/docs/api/java/util/AbstractMap.SimpleEntry.html

Yes , I want to Store 'map' into 'mapiRamAsset' under a specific key, how do I create key and pass to simpleEntry? how to Iterate the mapiRamAsset
Please help
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
Don't use that implementation. Use the Interface Map.Entry<K, V> instead.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hello ranchers, how do I use Map.SimpleEntry to store and return
 
Similar Threads
Collections.sort() does not sort my ArrayList
Object and Abstract, Non- Abstract Classes & Methods
equals and hashcodes method query
DOUBT REGARDING OBJECT REFERENCES
GC