@SuppressWarnings("unchecked")
   public static <E> E findFirstMatch(Collection<?> source, Collection<E> candidates) {
      if (isEmpty(source) || isEmpty(candidates)) {
         return null;
      }
      for (Object candidate : candidates) {
         if (source.contains(candidate)) {
            return (E) candidate;
         }
      }
      return null;
   }