org.nlab.json.stream.predicate.Predicates Maven / Gradle / Ivy
package org.nlab.json.stream.predicate;
import java.util.function.Predicate;
import org.nlab.json.stream.context.StreamContext;
import org.nlab.json.stream.jsonpath.JsonPath;
/**
* Created by nlabrot on 15/03/15.
*/
public final class Predicates {
private Predicates() {
}
public static Predicate objects(String... elements) {
return new ObjectPredicate(elements);
}
public static Predicate jsonPath(String query) {
return new JsonPathPredicate(JsonPath.parse(query));
}
public static Predicate all() {
return AllPredicate.INSTANCE;
}
}