public class ListUtil
extends java.lang.Object
Constructor and Description |
---|
ListUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
findFirstCommon(java.util.Collection<T> master,
java.util.Collection<T> check,
T notFound)
Find the first entry in the master collection that is also present in the
check collection.
|
public static <T> T findFirstCommon(java.util.Collection<T> master, java.util.Collection<T> check, T notFound)
master
- The master collectioncheck
- The collection to checknotFound
- The value to return if there are no common elements
(including the case were one collection is null or empty)