How to get Value according to comparison. I am new in android and comparison is working fine but m not able to get value as it is displaying in arraylist. Below is my code and log-
for (Entry<Integer, List<String>> entry : abbre.entrySet())
{
Log.d("Abbrevations values- ", entry.getKey() + " " + entry.getValue());
if(tid.equals(String.valueOf(entry.getKey()))){
//String aValue = String.valueOf(entry.getValue());
Log.d("abbrKey Value: ", String.valueOf(entry.getValue()));
}
else{
Log.d("abbrKey Key: ", String.valueOf(entry.getKey()));
}
}
The log -
06-27 11:27:39.375: D/abbrKey tid:(13602): 27
06-27 11:27:39.375: D/Abbrevations values-(13602): 23 [8+, 4+, 2-]
06-27 11:27:39.375: D/abbrKey Key:(13602): 23
06-27 11:27:39.375: D/Abbrevations values-(13602): 27 [8+, 4+, 2-]
06-27 11:27:39.375: D/abbrKey Value:(13602): [8+, 4+, 2-]
06-27 11:27:39.375: D/Abbrevations values-(13602): 22 [8+, 4+, 2-]
06-27 11:27:39.375: D/abbrKey Key:(13602): 22