There is one method of Collection
named retainAll
but having some side effects for you reference
Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.
true if this list changed as a result of the call
Its like
boolean b = list1.retainAll(list2);