algoliasearch/src/main/java/com/algolia/search/saas/helpers/DisjunctiveFaceting.java
static private @NonNull <T extends Collection<String>> Map<String, T> filterDisjunctiveRefinements(@NonNull Collection<String> disjunctiveFacets, @NonNull Map<String, T> refinements)
    {
        Map<String, T> disjunctiveRefinements = new HashMap<>();
        for (Map.Entry<String, T> elt : refinements.entrySet()) {
            if (disjunctiveFacets.contains(elt.getKey())) {
                disjunctiveRefinements.put(elt.getKey(), elt.getValue());
            }
        }
        return disjunctiveRefinements;
    }
static private @NonNull <T extends Collection<String>> Map<String, T> filterDisjunctiveRefinements(@NonNull Collection<String> disjunctiveFacets, @NonNull Map<String, T> refinements)
    {
        Map<String, T> disjunctiveRefinements = new HashMap<>();
        for (Map.Entry<String, T> elt : refinements.entrySet()) {
            if (disjunctiveFacets.contains(elt.getKey())) {
                disjunctiveRefinements.put(elt.getKey(), elt.getValue());
            }
        }
        return disjunctiveRefinements;
    }
static private @ NonNull < T extends Collection < String > > Map < String , T > filterDisjunctiveRefinements ( @ NonNull Collection < String > disjunctiveFacets , @ NonNull Map < String , T > refinements ) { Map < String , T > disjunctiveRefinements = new HashMap <> ( ) ; for ( Map . Entry < String , T > elt : refinements . entrySet ( ) ) { if ( disjunctiveFacets . contains ( elt . getKey ( ) ) ) { disjunctiveRefinements . put ( elt . getKey ( ) , elt . getValue ( ) ) ; } } return disjunctiveRefinements ; }
Filter disjunctive refinements from generic refinements and a list of disjunctive facets.

@param disjunctiveFacets the array of disjunctive facets
@param refinements       Map representing the current refinements
@return The disjunctive refinements
Filter disjunctive refinements from generic refinements and a list of disjunctive facets .