public static < E > Set < E > intersection ( Set < E > s1 , Set < E > s2 ) { Set < E > s = new HashSet < E > ( ) ; s . addAll ( s1 ) ; s . retainAll ( s2 ) ; return s ; }
Returns the intersection of sets s1 and s2 .