Class ListUtil

java.lang.Object
net.sf.basedb.util.ListUtil

public class ListUtil extends Object
Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-10-27 09:16:20 +0200 (to, 27 okt 2011) $
  • Constructor Details

    • ListUtil

      public ListUtil()
  • Method Details

    • findFirstCommon

      public static <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. If there is no such entry, the notFound value is returned.
      Parameters:
      master - The master collection
      check - The collection to check
      notFound - The value to return if there are no common elements (including the case were one collection is null or empty)