Statistics
| Revision:

svn-gvsig-desktop / 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 / Function.java @ 44750

History | View | Annotate | Download (1.63 KB)

1 43512 jjdelcerro
package org.gvsig.expressionevaluator;
2
3
import java.util.List;
4
import org.apache.commons.lang3.Range;
5
6
public interface Function {
7
8 43521 jjdelcerro
    public final String GROUP_NUMERIC = "Numeric";
9
    public final String GROUP_STRING = "String";
10
    public final String GROUP_DATETIME = "Datetime";
11
    public final String GROUP_BOOLEAN = "Boolean";
12
    public final String GROUP_OGC = "OGC";
13 44139 jjdelcerro
    public final String GROUP_PROGRAMMING = "Programming";
14 44198 jjdelcerro
    public final String GROUP_CONVERSION = "Conversion";
15 44712 jjdelcerro
    public final String GROUP_AGGREGATE = "Aggregate";
16 43939 jjdelcerro
    public final String GROUP_OTHER = "Other";
17 43521 jjdelcerro
18 43512 jjdelcerro
    public String group();
19
20
    public String name();
21 43939 jjdelcerro
22
    public String returnType();
23 43512 jjdelcerro
24
    public Range argc();
25
26
    public String description();
27
28 43521 jjdelcerro
    public String template();
29
30 43512 jjdelcerro
    public String[] descriptionArgs();
31
32 43521 jjdelcerro
    public Object call(Interpreter interpreter, Object[] args) throws Exception;
33 43512 jjdelcerro
34 44139 jjdelcerro
    public Object call(Interpreter interpreter, Codes args) throws Exception;
35 43939 jjdelcerro
36 43512 jjdelcerro
    public void addAlias(String name);
37
38 44139 jjdelcerro
    public List<String> aliases();
39 43521 jjdelcerro
40
    public boolean isOperator();
41 43939 jjdelcerro
42 44738 jjdelcerro
    public boolean isHidden();
43
44 43939 jjdelcerro
    public boolean useArgumentsInsteadObjects();
45 43989 jjdelcerro
46
    public boolean isSQLCompatible();
47 44009 jjdelcerro
48
    /**
49
     * Returns true if the function always returns the same value for
50
     * the same parameters. If so, it is possible to optimize the
51
     * generated code through the process of "constant folding".
52
     *
53
     * https://en.wikipedia.org/wiki/Constant_folding
54
     *
55
     * @return true if this function allow constant folding optimization.
56
     */
57
    public boolean allowConstantFolding();
58 44738 jjdelcerro
59 43512 jjdelcerro
}