Code example for HashMap

Methods: containsKeyget

    return null; 
  public void DisplayImage(int uid, Activity activity, ImageView imageView) {
    if (cache.containsKey(uid))
    else { 
      queuePhoto(uid, activity, imageView);
  private Bitmap getBitmap(int uid) {
    // I identify images by hashcode. Not a perfect solution, good for the 
    // demo. 
    String filename = String.valueOf(uid);
    File f = new File(cacheDir, filename);
    // from SD cache 
Stop searching for code, let great code find you!  Add Codota to your java IDE