| 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.
|
 |
 |
|
|
subject: Alternate way of inserting the values in map?
|
|
|