(String src, int index, String name, int count, List<MathFunction> innerFunctions)
| 87 | } |
| 88 | |
| 89 | static MathFunction getFunction(String src, int index, String name, int count, List<MathFunction> innerFunctions) throws MathFunctionInvalidArgumentsException { |
| 90 | MathFunction function = null; |
| 91 | if (innerFunctions != null) |
| 92 | for (MathFunction func : innerFunctions) |
| 93 | if (func.compareNames(name)) { |
| 94 | function = func; |
| 95 | if (func.getParameterCount() == count || func.getParameterCount() == -1) |
| 96 | return func; |
| 97 | } |
| 98 | |
| 99 | for (MathFunction func : functions) |
| 100 | if (func.compareNames(name)) { |
| 101 | function = func; |
| 102 | if (func.getParameterCount() == count || func.getParameterCount() == -1) |
| 103 | return func; |
| 104 | } |
| 105 | |
| 106 | if (function != null) |
| 107 | throw new MathFunctionInvalidArgumentsException(src, index, function, count); |
| 108 | return null; |
| 109 | } |
| 110 | |
| 111 | /* Built-in functions */ |
| 112 |
no test coverage detected