From ca4091ba00abf1531f0a0ca23775d9a42df2c315 Mon Sep 17 00:00:00 2001 From: Miroslav Pokorny Date: Wed, 6 Dec 2023 18:21:46 +1100 Subject: [PATCH] ExpressionFunctionParameterKind javadoc update with examples --- .../ExpressionFunctionParameterKind.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/main/java/walkingkooka/tree/expression/function/ExpressionFunctionParameterKind.java b/src/main/java/walkingkooka/tree/expression/function/ExpressionFunctionParameterKind.java index 940a037e..58bda70a 100644 --- a/src/main/java/walkingkooka/tree/expression/function/ExpressionFunctionParameterKind.java +++ b/src/main/java/walkingkooka/tree/expression/function/ExpressionFunctionParameterKind.java @@ -28,26 +28,34 @@ public enum ExpressionFunctionParameterKind { /** - * All parameters are converted to their declared type. + * All parameters values must be converted to their declared type. */ CONVERT, /** - * Indicates that any parameters in {@link walkingkooka.tree.expression.Expression} form be evaluated into java - * objects prior to invoking {@link ExpressionFunction#apply(Object, Object)}. For the vast majority of - * cases all functions will return true, but for cases such as Excels isError it may be desired to catch any thrown - * exceptions and substitute an error object of some kind. + * Indicates that any parameter value that are {@link walkingkooka.tree.expression.Expression} must be evaluated + * into a non {@link walkingkooka.tree.expression.Expression} value. For the vast majority of cases all functions + * will return true, but for cases such as Excels isError it may be desired to catch any thrown exceptions and + * substitute an error object of some kind. */ EVALUATE, /** - * Flatten expands any lists. + * Flatten or expands any lists into a single list of values. + *
+     * 1
+     * list( 2, 3, 4)
+     * 5
+     *
+     * becomes
+     * 1, 2, 3, 4, 5
+     * 
*/ FLATTEN, /** - * Indicates that parameters that implement {@link walkingkooka.tree.expression.ExpressionReference} are resolved to - * their actual non {@link walkingkooka.tree.expression.Expression} value. + * Indicates that parameter values that implement {@link walkingkooka.tree.expression.ExpressionReference} are + * resolved to their actual non {@link walkingkooka.tree.expression.Expression} value. * This is only honoured when {@link walkingkooka.tree.expression.ExpressionEvaluationContext#evaluateFunction(ExpressionFunction, List)} is used. */ RESOLVE_REFERENCES;