|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jayway.jsonpath.Filter<T>
public abstract class Filter<T>
A filter is used to filter the content of a JSON array in a JSONPath.
Sample
String doc = {"items": [{"name" : "john"}, {"name": "bob"}]}
List
Criteria| Nested Class Summary | |
|---|---|
static class |
Filter.FilterAdapter<T>
|
| Constructor Summary | |
|---|---|
Filter()
|
|
| Method Summary | |
|---|---|
abstract boolean |
accept(T obj)
Check if this filter will accept or reject the given object |
abstract Filter |
addCriteria(Criteria criteria)
Adds a new criteria to this filter |
List<T> |
doFilter(List<T> filterItems)
Filters the provided list based on this filter configuration |
static Filter |
filter(Criteria criteria)
Creates a new filter based on given criteria |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Filter()
| Method Detail |
|---|
public static Filter filter(Criteria criteria)
criteria - the filter criteria
public List<T> doFilter(List<T> filterItems)
filterItems - items to filter
public abstract boolean accept(T obj)
obj - item to check
public abstract Filter addCriteria(Criteria criteria)
criteria - to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||