Here you can find the source of removeAllIfNotNull(final Collection super E> collection, final Collection extends E> c)
public static <E> boolean removeAllIfNotNull(final Collection<? super E> collection, final Collection<? extends E> c)
//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 }