All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nlab.json.stream.matcher.EventMatchers Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package org.nlab.json.stream.matcher;

import org.apache.commons.lang3.Validate;
import org.jooq.lambda.fi.util.function.CheckedFunction;
import org.nlab.json.stream.context.StreamContext;
import org.nlab.json.stream.predicate.Predicates;


public final class EventMatchers {

    private EventMatchers() {
    }

    public static EventMatcher jsonPath(String query, CheckedFunction consumer){
        Validate.notBlank(query);
        return new EventMatcher(Predicates.jsonPath(query), consumer);
    }


    public static EventMatcher objects(String[] keys, CheckedFunction consumer){
        Validate.notEmpty(keys);
        return new EventMatcher(Predicates.objects(keys), consumer);
    }

    public static EventMatcher object(String key, CheckedFunction consumer){
        Validate.notBlank(key);
        return new EventMatcher(Predicates.objects(key), consumer);
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy