I am working on an android app and have a map of maps in which I put a number of entries in the onCreate
.
This map is of the form:
Map<String, Map<Integer, Integer[]>> map
and what I intend to do with it is that a letter is chosen at random and subsequently a number is chosen at random, and then it returns the list of integers. I intend to put in about a thousand numbers with their corresponding lists like (it's a draft):
map.put("A").put(1, new int[]{1,2,3,4,5,6,7,8,9,10});
map.put("A").put(2, new int[]{2,3,4,5,6,7,8,9,10,11});
.
.
.
map.put("Z").put(1000, new int[]{3456,3459,245,243,422,112,888,556,332,111});
I have two questions regarding this.
Since I'm using the 'put' function so many times, will this slow down the app in the onCreate
, and if so, how could I do this more efficiently?
And secondly might a 'large' (I don't know if this is actually large at all) map cause issues for older phones which might be slower?