All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.xmljim.json.jsonpath.predicate.ContainsPredicate Maven / Gradle / Ivy

The newest version!
package io.github.xmljim.json.jsonpath.predicate;

import io.github.xmljim.json.jsonpath.context.Context;
import io.github.xmljim.json.jsonpath.predicate.expression.Expression;

class ContainsPredicate extends StringFilterPredicate {

    public ContainsPredicate(Expression leftSide, Expression rightSide) {
        super(leftSide, rightSide, PredicateOperator.CONTAINS);
    }

    @Override
    public boolean test(Context context) {
        return getValue(leftSide(), context).contains(getValue(rightSide(), context));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy