Code example for ConcurrentMap

Methods: containsKey, get

0
public void clearCache(){ 
	cache.clear();
} 
 
public  Drawable getDrawableFromCache(String url) {  
    if (cache.containsKey(url)) {  
        return cache.get(url); 
    }   
 
    return null;   
}   
 
public void queueJob(final String url, final ImageView imageView) {  
    /* Create handler in UI thread. */   
    final   Handler handler = new Handler() {  
        @Override   
        public void handleMessage(Message msg) {  
            String tag = imageViews.get(imageView);  
            if (tag != null && tag.equals(url)) {  
                if (msg.obj != null) {  
                    imageView.setImageDrawable((Drawable) msg.obj);