Package net.sf.basedb.util
Class ListUtil
java.lang.Object
net.sf.basedb.util.ListUtil
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-10-27 09:16:20 +0200 (to, 27 okt 2011) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
findFirstCommon
(Collection<T> master, Collection<T> check, T notFound) Find the first entry in the master collection that is also present in the check collection.
-
Constructor Details
-
ListUtil
public ListUtil()
-
-
Method Details
-
findFirstCommon
Find the first entry in the master collection that is also present in the check collection. If there is no such entry, the notFound value is returned.- Parameters:
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)
-