Package org.jaxen.expr
Class DefaultPredicate
java.lang.Object
org.jaxen.expr.DefaultPredicate
- All Implemented Interfaces:
Serializable
,Predicate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEvaluates this predicate's expression and returns the result.getExpr()
Returns the expression in this predicate.getText()
Returns the string form of the predicate, including the square brackets.void
Change the expression used by this predicate.void
simplify()
Simplify the expression in this predicate.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
expr
-
-
Constructor Details
-
DefaultPredicate
DefaultPredicate(Expr expr)
-
-
Method Details
-
getExpr
Description copied from interface:Predicate
Returns the expression in this predicate. -
setExpr
Description copied from interface:Predicate
Change the expression used by this predicate. -
getText
Description copied from interface:Predicate
Returns the string form of the predicate, including the square brackets. -
toString
-
simplify
public void simplify()Description copied from interface:Predicate
Simplify the expression in this predicate. -
evaluate
Description copied from interface:Predicate
Evaluates this predicate's expression and returns the result. The result will be ajava.lang.Double
for expressions that return a number, ajava.lang.String
for expressions that return a string, ajava.lang.Boolean
for expressions that return a boolean, and ajava.util.List
for expressions that return a node-set. In the latter case, the elements of the list are the actual objects from the source document model. Copies are not made.- Specified by:
evaluate
in interfacePredicate
- Parameters:
context
- the context in which the expression is evaluated- Returns:
- an object representing the result of the evaluation
- Throws:
JaxenException
- See Also:
-