MCPcopy Create free account
hub / github.com/apache/calcite / intersects

Method intersects

core/src/main/java/org/apache/calcite/util/Util.java:2402–2409  ·  view source on GitHub ↗

Returns whether two collections have any elements in common.

(Collection<E> c0, Collection<E> c1)

Source from the content-addressed store, hash-verified

2400
2401 /** Returns whether two collections have any elements in common. */
2402 public static <E> boolean intersects(Collection<E> c0, Collection<E> c1) {
2403 for (E e : c1) {
2404 if (c0.contains(e)) {
2405 return true;
2406 }
2407 }
2408 return false;
2409 }
2410
2411 /** Looks for a string within a list of strings, using a given
2412 * case-sensitivity policy, and returns the position at which the first match

Callers 8

testIntersectsMethod · 0.95
sqlMethod · 0.45
ST_EnvelopesIntersectMethod · 0.45
ST_IntersectsMethod · 0.45
onMatchMethod · 0.45
isStrongMethod · 0.45
splitMethod · 0.45
projectPredicateMethod · 0.45

Calls 1

containsMethod · 0.65

Tested by 1

testIntersectsMethod · 0.76