code: public static <T> boolean anyValuesInCommon(Collection<T> c1, Collection<T> c2)
      {
          // Let's always iterate over smaller collection:
          if (c1.size() > c2.size()) {
              Collection<T> tmp = c1;
              c1 = c2;
              c2 = tmp;
          }
          Iterator<T> it = c1.iterator();
          while (it.hasNext()) {
              if (c2.contains(it.next())) {
                  return true;
              }
          }
          return false;
      }
docs: Method that can be used to efficiently check if 2 collections
  share at least one common element.
  
  @return True if there is at least one element that's common
  to both Collections, ie. that is contained in both of them.