Interface Evaluable

    • Method Detail

      • evaluate

        Object evaluate​(Properties bindings)
        Evaluate this expression in the given environment (bindings).
      • getSource

        String getSource()
        Returns the source string which generated this expression. This does not include the language prefix, which can be obtained by getLanguagePrefix().
      • getLanguagePrefix

        String getLanguagePrefix()
        the language prefix used to generate this evaluable.
      • isLocal

        default boolean isLocal()
        true when the evaluable can be computed fully (and quickly) from the local context (the given row or record). If it relies on any other information (external web service, aggregation over the project), then it should return false, indicating that the return value may need to be cached by the caller.
      • getColumnDependencies

        default Set<String> getColumnDependencies​(String baseColumn)
        Returns the names of the columns this expression depends on.
        baseColumn - the name of the column this expression is based on (null if none)
        null if the columns could not be isolated: in this case, the expression might depend on all columns in the project.
      • renameColumnDependencies

        default Evaluable renameColumnDependencies​(Map<String,​String> substitutions)
        Translates this expression by simultaneously substituting column names as the supplied map specifies.

        This is only possible if the extraction of column dependencies with getColumnDependencies(String) succeeds (return a non-null value).

        substitutions - a map specifying new names for some columns. If a column name is not present in the map, it is assumed that the column is not renamed.
        a new expression with updated column names.
      • getFullSource

        default String getFullSource()
        the source prefixed by the language prefix