android-components / mozilla.components.lib.jexl / Jexl

# Jexl

`class Jexl` (source)

### Constructors

<init> | `Jexl(grammar: Grammar = Grammar())`

### Functions

addTransform | `fun addTransform(name: String, transform: Transform): Unit` Adds or replaces a transform function in this Jexl instance.
evaluate | `fun evaluate(expression: String, context: JexlContext = JexlContext()): JexlValue` Evaluates a Jexl string within an optional context.
evaluateBooleanExpression | `fun evaluateBooleanExpression(expression: String, context: JexlContext = JexlContext(), defaultValue: Boolean? = null): Boolean` Evaluates a Jexl string with an optional context to a Boolean result. Optionally a default value can be provided that will be returned in the expression does not return a boolean result.