This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using a sorted map...

 
Greg Walker
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone show me an easy example of storing items in a sorted map? (The java tutorial is kinda confusing)
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Produces the output
 
Greg Walker
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now what if I wanted to do a one-to-many mapping, such as a group name <K> mapped to group numbers <V>, in which the values will be stored in a List?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://jakarta.apache.org/commons/collections/apidocs/org/apache/commons/collections/map/MultiValueMap.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic