in Something like 'contains any' for Java set? there a several solutions
- Collections.disjoint(A, B)
- setA.stream().anyMatch(setB::contains)
- Sets.intersection(set1, set2).isEmpty()
- CollectionUtils.containsAny()
im my case set1 is new ConcurrentHashMap<>().keySet() and set2 is an ArrayList
set1 can cointain up to 100 entries, set2 less then 10
Or will they all do the same and perform similar?