public class JELArrayFunction<I,O> extends Object implements java.util.function.Function<I,O>
Instances of this class are not threadsafe.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
JELArrayFunction.XResolver
This public class is an implementation detail,
 not intended for external use. 
 | 
| Constructor and Description | 
|---|
JELArrayFunction(String ivarName,
                String xvarName,
                String fexpr,
                Class<I> inClazz,
                Class<O> outClazz)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
O | 
apply(I inArray)
Does exactly the same as  
evaluate(I). | 
O | 
evaluate(I inArray)
Evaluates this expression. 
 | 
static <I> Object | 
evaluate(String ivarName,
        String xvarName,
        String fexpr,
        I inArray)
Utility method to create and use an array function in one go. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThen, compose, identitypublic JELArrayFunction(String ivarName, String xvarName, String fexpr, Class<I> inClazz, Class<O> outClazz) throws gnu.jel.CompilationException
ivarName - name of the array index variable (0-based)xvarName - name of the array element variable (for instance "x")fexpr - text of expression giving the function value,
                 in terms of xvarname (for instance "x+1")inClazz - type of input array; must be an array type of
                   primitive or object elementsoutClazz - type of output array; if not known, Object.class
                    may be given, and the output type will be determined
                    from the expressiongnu.jel.CompilationExceptionpublic O evaluate(I inArray)
inArray - input arraypublic O apply(I inArray)
evaluate(I).apply in interface java.util.function.Function<I,O>public static <I> Object evaluate(String ivarName, String xvarName, String fexpr, I inArray) throws gnu.jel.CompilationException
ivarName - name of the array index variable (for instance "i")xvarName - name of the array element variable (for instance "x")fexpr - text of expression giving the function value,
                 in terms of xvarname (for instance "x+1")inArray - input arraygnu.jel.CompilationExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.