public static <S>boolean containsAtleastOne(Collection<S> left,Collection<S> right){
  if (left == null || right == null) {
    return false;
  }
  for (  S id : left) {
    if (right.contains(id)) {
      return true;
    }
  }
  return false;
}

public static < S > boolean containsAtleastOne ( Collection < S > left , Collection < S > right ) { if ( left == null || right == null ) { return false ; } for ( S id : left ) { if ( right . contains ( id ) ) { return true ; } } return false ; }
checks if right hand collection has atleast one same item as left hand collection .
