• 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
  • 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
Posts: 15452
42
Android IntelliJ IDE Java Scala Spring
  • Likes 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
  • 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: 49845
70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use that implementation. Use the Interface Map.Entry<K, V> instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic