Package com.jayway.jsonpath
Class Filter
- java.lang.Object
-
- com.jayway.jsonpath.Filter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jayway.jsonpath.Predicate
Predicate.PredicateContext
-
-
Constructor Summary
Constructors Constructor Description Filter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Filterand(Predicate other)abstract booleanapply(Predicate.PredicateContext ctx)static Filterfilter(Predicate predicate)Creates a new Filter based on given criteriastatic Filterfilter(java.util.Collection<Predicate> predicates)Create a new Filter based on given list of criteria.Filteror(Predicate other)static Filterparse(java.lang.String filter)Parses a filter.
-
-
-
Method Detail
-
filter
public static Filter filter(Predicate predicate)
Creates a new Filter based on given criteria- Parameters:
predicate- criteria- Returns:
- a new Filter
-
filter
public static Filter filter(java.util.Collection<Predicate> predicates)
Create a new Filter based on given list of criteria.- Parameters:
predicates- list of criteria all needs to evaluate to true- Returns:
- the filter
-
apply
public abstract boolean apply(Predicate.PredicateContext ctx)
-
parse
public static Filter parse(java.lang.String filter)
Parses a filter. The filter must match[?(, white spaces are ignored.)] - Parameters:
filter- filter string to parse- Returns:
- the filter
-
-