Tag Archives: hashmap

3,412 views

ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree

Link to tutorial ArrayList Sublist of ArrayList Join two ArrayList Compare ArrayList Initialize ArrayList Loop ArrayList Sort ArrayList Array to ArrayList ArrayList to Array Synchronize ArrayList Serialize ArrayList LinkedList Loop LinkedList Vector ArrayList vs Vector ArrayList vs LinkedList HashMap Loop … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree
31,223 views

SparseArray instead HashMap Android example

Old code with HashMap Map<Integer, Bitmap> _bitmapCache = new HashMap<Integer, Bitmap>(); private void fillBitmapCache() { _bitmapCache.put(R.drawable.icon, BitmapFactory.decodeResource(getResources(), R.drawable.icon)); _bitmapCache.put(R.drawable.abstrakt, BitmapFactory.decodeResource(getResources(), R.drawable.abstrakt)); _bitmapCache.put(R.drawable.wallpaper, BitmapFactory.decodeResource(getResources(), R.drawable.wallpaper)); _bitmapCache.put(R.drawable.scissors, BitmapFactory.decodeResource(getResources(), }   Bitmap bm = _bitmapCache.get(R.drawable.icon); Lint warning: Use new SparseArray(…) instead for better … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , | Comments Off on SparseArray instead HashMap Android example
3,954 views

Iterate HashMap getKey getValue Java Example

HashMap<String,Locale> _mapOfLocale = new HashMap<String,Locale>(); _mapOfLocale.put("French",Locale. FRENCH ); _mapOfLocale.put("German",Locale. GERMAN ); _mapOfLocale.put("Italian",Locale. ITALIAN );   for (Entry<String, Locale> entry : _mapOfLocale.entrySet()) {   System.out.println(entry.getKey()); System.out.println(entry.getValue());   }

Posted in Android Examples Code, Array,List,Collections | Tagged , , | Comments Off on Iterate HashMap getKey getValue Java Example