anilchahal7

Untitled

Jul 4th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. No of Image URL Hits ...
  2.  
  3. Map<String, String> urlmap = new HashMap<>();
  4. Set<String> urlset = new HashSet<>();
  5. for (int i = 0; i < NetworkImageView.imageUrlList.size(); i++) {
  6. urlset.add(NetworkImageView.imageUrlList.get(i));
  7. urlmap.put("ImageUrl-" + i, NetworkImageView.imageUrlList.get(i));
  8. }
  9. urlmap.size();
  10. urlset.size();
  11. /*
  12. for (int i = 0; i < urlmap.size(); i++) {
  13. urlset.add(NetworkImageView.imageUrlList.get(i));
  14. urlmap.put("ImageUrl-" + i, NetworkImageView.imageUrlList.get(i));
  15. }*/
  16.  
  17.  
  18. ----------------
  19. Map<String, String> urlmap = new HashMap<>();
  20. Set<String> urlset = new HashSet<>();
  21. for (int i = 0; i < NetworkImageView.imageUrlList.size(); i++) {
  22. //urlset.add(NetworkImageView.imageUrlList.get(i));
  23. urlmap.put("ImageUrl-" + i, NetworkImageView.imageUrlList.get(i));
  24. }
  25. //urlmap.size();
  26. //urlset.size();
  27. for (String s : new ConcurrentHashMap<>(urlmap).keySet()) {
  28. String value = urlmap.get(s);
  29. for (Map.Entry<String, String> ss : new ConcurrentHashMap<>(urlmap)
  30. .entrySet()) {
  31. if (s.equalsIgnoreCase(ss.getKey()) && value.equalsIgnoreCase(ss.getValue())) {
  32. //urlmap.remove(ss.getKey());
  33. urlset.add(ss.getKey());
  34. }
  35. }
  36. }
Add Comment
Please, Sign In to add comment