Yes as said, you should not be doing this. Probably fix it at source.
But you can certaing look at this.
public class CapsKeyMap
{
public static void main(String[] args)
{
Map lcMap = new HashMap();
lcMap.put("one","ONE");
lcMap.put("two","TWO");
lcMap.put
temp temp ha scritto:
I get this Map from a collection and collection might have 1000 or more Maps
so I first iterate over this collection retrieve the map and then iterate
over this map so creating a new Map for each iteration is this a good design
?
Surely it is not a good design,
I get this Map from a collection and collection might have 1000 or more Maps
so I first iterate over this collection retrieve the map and then iterate
over this map so creating a new Map for each iteration is this a good design
?
Thanks & Regards
Antonio Petrelli <[EMAIL PROTECTED]> wro
temp temp ha scritto:
I have a HashMap with some data .I must alter the Map by replacing the
keys with their upper case.
Ok first of all you cannot modify a HashMap while you are iterating it.
But your problem has a solution.
Iterate the map and store into another map the key-value pair
I have a HashMap with some data .I must alter the Map by replacing the
keys with their upper case.
Map searchResultMap=
(Map)request.getAttribute("searchResults");
ListIterator
searchResultMapIte=Arrays.asList(searchResultMap.keySet().toArray()).list
5 matches
Mail list logo