How Best to Compare Two Collections in Java and Act on Them?

Apache’s commons.collections library has a CollectionUtils class that provides easy-to-use methods for Collection manipulation/checking, such as intersection, difference, and union.

The org.apache.commons.collections.CollectionUtils API docs are here.

Leave a Comment