Class PredicateContextImpl
- java.lang.Object
-
- com.jayway.jsonpath.internal.path.PredicateContextImpl
-
- All Implemented Interfaces:
Predicate.PredicateContext
public class PredicateContextImpl extends java.lang.Object implements Predicate.PredicateContext
-
-
Constructor Summary
Constructors Constructor Description PredicateContextImpl(java.lang.Object contextDocument, java.lang.Object rootDocument, Configuration configuration, java.util.HashMap<Path,java.lang.Object> documentPathCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configurationconfiguration()Configuration to use when evaluatingjava.util.HashMap<Path,java.lang.Object>documentPathCache()java.lang.Objectevaluate(Path path)java.lang.Objectitem()Returns the current item being evaluated by this predicate<T> Titem(java.lang.Class<T> clazz)Returns the current item being evaluated by this predicate.java.lang.Objectroot()Returns the root document (the complete JSON)
-
-
-
Constructor Detail
-
PredicateContextImpl
public PredicateContextImpl(java.lang.Object contextDocument, java.lang.Object rootDocument, Configuration configuration, java.util.HashMap<Path,java.lang.Object> documentPathCache)
-
-
Method Detail
-
evaluate
public java.lang.Object evaluate(Path path)
-
documentPathCache
public java.util.HashMap<Path,java.lang.Object> documentPathCache()
-
item
public java.lang.Object item()
Description copied from interface:Predicate.PredicateContextReturns the current item being evaluated by this predicate- Specified by:
itemin interfacePredicate.PredicateContext- Returns:
- current document
-
item
public <T> T item(java.lang.Class<T> clazz) throws MappingExceptionDescription copied from interface:Predicate.PredicateContextReturns the current item being evaluated by this predicate. It will be mapped to the provided class- Specified by:
itemin interfacePredicate.PredicateContext- Returns:
- current document
- Throws:
MappingException
-
root
public java.lang.Object root()
Description copied from interface:Predicate.PredicateContextReturns the root document (the complete JSON)- Specified by:
rootin interfacePredicate.PredicateContext- Returns:
- root document
-
configuration
public Configuration configuration()
Description copied from interface:Predicate.PredicateContextConfiguration to use when evaluating- Specified by:
configurationin interfacePredicate.PredicateContext- Returns:
- configuration
-
-