![JAR search and dependency download from the Maven repository](/logo.png)
org.nlab.json.stream.matcher.EventMatchers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-stream Show documentation
Show all versions of json-stream Show documentation
Json Streaming / JsonPath Matcher
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