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

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

 
ravisankar sankar
Greenhorn
Posts: 29
Eclipse IDE Netbeans IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Please tell me how can I store and Iterate this map
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
ravisankar sankar
Greenhorn
Posts: 29
Eclipse IDE Netbeans IDE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use that implementation. Use the Interface Map.Entry<K, V> instead.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic