/** * Sets the function parameters. */ public void setParameters(List params) { if(params == null){ throw new NullPointerException("Function parameters required"); } final int argCount = getArgCount(); final int paramsSize = params.size(); if(argCount > 0 && argCount != paramsSize){ throw new IllegalArgumentException("Function "+name+" expected " + argCount + " arguments, got " + paramsSize); } this.params = new ArrayList(params); }
/** * Sets the function parameters. */ public void setParameters(List params) { if(params == null){ throw new NullPointerException("params can't be null"); } final int argCount = getArgCount(); final int paramsSize = params.size(); if(argCount != paramsSize){ throw new IllegalArgumentException("Expected " + argCount + " arguments, got " + paramsSize); } this.params = new ArrayList(params); }
public synchronized FunctionName getFunctionName() { if( functionName == null ){ functionName = new FunctionNameImpl( getName(), getArgCount() ); } return functionName; }