Revision 44138 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/programming/IFNULLFunction.java

View differences:

IFNULLFunction.java
1
package org.gvsig.expressionevaluator.impl.function.obj;
1
package org.gvsig.expressionevaluator.impl.function.programming;
2 2

  
3 3
import org.apache.commons.lang3.Range;
4
import org.gvsig.expressionevaluator.Code.Caller.Arguments;
4
import org.gvsig.expressionevaluator.Codes;
5 5
import org.gvsig.expressionevaluator.Function;
6 6
import org.gvsig.expressionevaluator.Interpreter;
7 7
import org.gvsig.expressionevaluator.spi.AbstractFunction;
8 8

  
9

  
9 10
public class IFNULLFunction extends AbstractFunction {
10 11

  
11 12
    public IFNULLFunction() {
12
        super(
13
                Function.GROUP_OTHER, 
13
        super(Function.GROUP_BOOLEAN, 
14 14
                "IFNULL", 
15 15
                Range.is(3),
16 16
                "The IFNULL() function tests if a specified value is null and returns one of two values, based on whether the value is null was true or false.",
......
27 27
    }
28 28

  
29 29
    @Override
30
    public boolean allowConstantFolding() {
31
        return false;
32
    }
33
    
34
    @Override
30 35
    public Object call(Interpreter interpreter, Object[] args) throws Exception {
31 36
        throw new UnsupportedOperationException("Not supported yet."); 
32 37
    }
33 38
    
34 39
    @Override
35
    public Object call(Interpreter interpreter, Arguments args) throws Exception {
40
    public Object call(Interpreter interpreter, Codes args) throws Exception {
36 41
        Object value = getObject(interpreter, args, 0);
37 42
        if( value == null ) {
38 43
            value = getObject(interpreter, args, 1);

Also available in: Unified diff