808727 wrote:Do you mean you are able to iterate through the map entrySet?
I've added about 50 class instances to a map and
im able to reference then and find names etc but i'm not able to use the object that a key represents.
im able to loop through each object
but i then want to be able to access a method for that instance, ie.
Object metricBoxInstance = (Object)m.getKey();
i then want to use metricBoxInstance.setText("for example");
mp = new HashMap<Object,String>(); //setup my map testbox = new metricBox(this,columnNames,data[i],config,columnNames[i]); //create instance of metricBox
mp.put(testbox,columnNames[i]); //add to map
Set s = mp.entrySet();
Iterator it = s.iterator();
Map.Entry m = (Map.Entry)it.next();
Object metricBoxInstance =(Object)m.getKey();
String value = (String)m.getValue();
** at this point i wanna send a set text method to each metricBox but dont know how.