List of utility methods to do Set Intersect
if (a == null || b == null) return new HashSet<>(); Set<T> result = new HashSet<>(a); result.retainAll(b); return result;