Java Collection Null removeAllIfNotNull(final Collection collection, final Collection c)

Here you can find the source of removeAllIfNotNull(final Collection collection, final Collection c)

Description

remove All If Not Null

License

Apache License

Declaration

public static <E> boolean removeAllIfNotNull(final Collection<? super E> collection,
            final Collection<? extends E> c) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    public static <E> boolean removeAllIfNotNull(final Collection<? super E> collection,
            final Collection<? extends E> c) {
        return (collection != null) && (c != null) && collection.removeAll(c);
    }//from w w  w .  jav a2  s .c o  m
}

Related

  1. nullSafe(Collection in)
  2. nullSafeCollection(Collection source)
  3. nullSafeSize(Collection collection)
  4. nullSafeSize(final Collection collection)
  5. padWithNulls(final Collection s1, final Collection s2)
  6. removeNull(Collection collection)
  7. removeNull(final Collection c)
  8. removeNullElement(Collection collection)
  9. removeNulls(Collection p_collection)