Revision 44139 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/spi/AbstractFunction.java
AbstractFunction.java | ||
---|---|---|
12 | 12 |
import org.apache.commons.lang3.StringUtils; |
13 | 13 |
import org.apache.commons.math.util.MathUtils; |
14 | 14 |
import org.gvsig.expressionevaluator.Code; |
15 |
import org.gvsig.expressionevaluator.Code.Caller.Arguments;
|
|
15 |
import org.gvsig.expressionevaluator.Codes; |
|
16 | 16 |
import org.gvsig.expressionevaluator.Function; |
17 | 17 |
import org.gvsig.expressionevaluator.I18N; |
18 | 18 |
import org.gvsig.expressionevaluator.Interpreter; |
... | ... | |
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
@Override |
109 |
public List<String> alias() { |
|
109 |
public List<String> aliases() {
|
|
110 | 110 |
return this.alias; |
111 | 111 |
} |
112 | 112 |
|
... | ... | |
136 | 136 |
} |
137 | 137 |
|
138 | 138 |
@Override |
139 |
public Object call(Interpreter interpreter, Arguments args) throws Exception {
|
|
139 |
public Object call(Interpreter interpreter, Codes args) throws Exception {
|
|
140 | 140 |
return null; |
141 | 141 |
} |
142 | 142 |
|
... | ... | |
208 | 208 |
return args[n]; |
209 | 209 |
} |
210 | 210 |
|
211 |
protected Object getObject(Interpreter interpreter, Arguments args, int n) {
|
|
212 |
if( args.count() < n ) {
|
|
213 |
throw new IllegalArgumentException(I18N.Required_argument_XargnX_and_only_found_XargcX_in_call_to_XIdentifierX(name(), args.count(), n));
|
|
211 |
protected Object getObject(Interpreter interpreter, Codes args, int n) {
|
|
212 |
if( args.size() < n ) {
|
|
213 |
throw new IllegalArgumentException(I18N.Required_argument_XargnX_and_only_found_XargcX_in_call_to_XIdentifierX(name(), args.size(), n));
|
|
214 | 214 |
} |
215 | 215 |
Code arg = args.get(n); |
216 | 216 |
Object value = interpreter.run(arg); |
... | ... | |
268 | 268 |
return toBoolean(value, accuracy); |
269 | 269 |
} |
270 | 270 |
|
271 |
protected boolean getBoolean(Interpreter interpreter, Arguments args, int n) {
|
|
271 |
protected boolean getBoolean(Interpreter interpreter, Codes args, int n) {
|
|
272 | 272 |
Object value = getObject(interpreter, args, n); |
273 | 273 |
return toBoolean(value, interpreter.getAccuracy()); |
274 | 274 |
} |
Also available in: Unified diff