class MatchOptionsAnalysis {

    private static final Predicate<Object> POSITIVE_NUMBER = x -> x instanceof Number && ((Number) x).doubleValue() > 0;
    private static final Predicate<Object> IS_STRING = x -> x instanceof String;
    private static final Predicate<Object> IS_NUMBER = x -> x instanceof Number;
    private static final Predicate<Object> NUMBER_OR_STRING = IS_NUMBER.or(IS_STRING);
    private static final Predicate<Object> IS_OPERATOR = Set.of("or", "and", "OR", "AND")::contains;

    private static final Map<String, Predicate<Object>> ALLOWED_SETTINGS = Map.ofEntries(
        entry("analyzer", IS_STRING),
        entry("boost", POSITIVE_NUMBER),
        entry("cutoff_frequency", POSITIVE_NUMBER),
        entry("fuzziness", NUMBER_OR_STRING), // validated at ES QueryParser
        entry("fuzzy_rewrite", IS_STRING),
        entry("max_expansions", POSITIVE_NUMBER),
        entry("minimum_should_match", NUMBER_OR_STRING),
        entry("operator", IS_OPERATOR),
        entry("prefix_length", POSITIVE_NUMBER),
        entry("rewrite", IS_STRING),
        entry("slop", POSITIVE_NUMBER),
        entry("tie_breaker", IS_NUMBER),
        entry("zero_terms_query", IS_STRING)
    );

    public static void validate(Map<String, Object> options) {<FILL_FUNCTION_BODY>}
}

        for (Map.Entry<String, Object> e : options.entrySet()) {
            String optionName = e.getKey();
            Predicate<Object> validator = ALLOWED_SETTINGS.get(optionName);
            if (validator == null) {
                throw new IllegalArgumentException(
                    String.format(Locale.ENGLISH, "unknown match option '%s'", optionName));
            }
            Object value = e.getValue();
            if (!validator.test(value)) {
                throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                    "invalid value for option '%s': %s", optionName, value));
            }
        }
    
<no_super_class>