Posted By

kvaso on 03/17/10


Tagged


Versions (?)

removing objects - part2


 / Published in: Java
 

  1. LinkedList<MyObj> list1 = new LinkedList<MyObj>();
  2.  
  3. list1.add(new MyObj("a", "aa")); //len pre debugovaci ucely
  4. list1.add(new MyObj("b", "bb"));
  5. list1.add(new MyObj("c", "cc"));
  6.  
  7. list1.removeAll(Arrays.asList(new MyObj("a", "d"))); //nameisto "d" moze byt hociaky string - aj null, cize rozhodujuce je to "a"

Report this snippet  

You need to login to post a comment.