Interface Expression

    • Method Detail

      • walk

        void walk​(java.util.function.Consumer<Expression> consumer)
        Traverse this expression.

        If this expression is a composite then all its sub-expressions will be traversed.

        Parameters:
        consumer - will be called for each Expression contained within this Expression.
      • replace

        Expression replace​(java.util.function.Function<LeafExpression,​LeafExpression> function)
        Returns a Expression with LeafExpressions in this Expression replaced with values returned from the given function.
        Parameters:
        function - returns the LeafExpression to use as a replacement for the LeafExpression it is called with, or null if the original LeafExpression should continue to be used.
        Returns:
        a new Expression with LeafExpressions in this Expression replaced with versions returned from function.