Collections.retainAll()

Signature

boolean retainAll ( Object collection, Object collection2 )

Domain

ACTION

Description

Retains only the elements in this collection that are contained in the specified collection.

Parameters

NameTypeDescription
collectionObjectThe Collection object
collection2ObjectCollection containing elements to be retained in this collection

Returns

TypeDescription
booleantrue, If this collection changed as a result of the call

Cautions

none