Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ArrayList tourists
- for (Tourist t : tourists) {
- if (t != null) {
- t.setId(idForm);
- }
- }
- tourists.removeAll(Collections.singleton(null));
- list.removeAll(Collections.singleton(null));
- public static String[] clean(final String[] v) {
- List<String> list = new ArrayList<String>(Arrays.asList(v));
- list.removeAll(Collections.singleton(null));
- return list.toArray(new String[list.size()]);
- }
- while(tourists.remove(null));
- for (Iterator<Tourist> itr = tourists.iterator(); itr.hasNext();) {
- if (itr.next() == null) { itr.remove(); }
- }
- ImmutableList.copyOf(Iterables.filter(tourists, Predicates.notNull()))
- List s1=new ArrayList();
- s1.add(null);
- yourCollection.removeAll(s1);
- tourists.removeAll(Arrays.asList(null));
- tourists.removeAll(Arrays.asList("null"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement