aspose file tools
The moose likes Java in General and the fly likes Alternate way of inserting the values in map? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Alternate way of inserting the values in map?" Watch "Alternate way of inserting the values in map?" New topic
Author

Alternate way of inserting the values in map?

john sal
Ranch Hand

Joined: Jul 30, 2010
Posts: 92

is there any alternate way of doing the same in order to avoid the if check because if check is only valid once for each key map is containing and until the key not present in the map. Once the map contains the key the if check will no longer valid.
Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 156

Guava - ArrayListMultimap may be useful for you.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

And if you don't want or can't add that library, I always use the following:


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
john sal
Ranch Hand

Joined: Jul 30, 2010
Posts: 92
Thanks Rob ...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

You're welcome.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Alternate way of inserting the values in map?
 
Similar Threads
Code to store null keys and null values in hashmap
How to store two similar values
For good programming, In the Hasp Map programming, what value given to Key. As I know I can put any
how to store multiple values in one key in hash table
Advice on comparing two text files