mrkirby153

Untitled

Apr 19th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. /*
  2.     Why is this
  3. */
  4. HashMap<String, SomeObj> map = new HashMap<String, String>();
  5.  
  6. map.get(someString);
  7.  
  8. // Faster than this
  9.  
  10. ArrayList<SomeObj> al = new ArrayList<>();
  11.  
  12. for(SomeObj obj : al){
  13.     if(obj.get() == something)
  14.         return obj;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment