Revision 44533 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/DefaultSymbolTable.java

View differences:

DefaultSymbolTable.java
1 1
package org.gvsig.expressionevaluator.impl;
2 2

  
3 3
import org.gvsig.expressionevaluator.spi.AbstractSymbolTable;
4
import java.util.ArrayList;
5 4
import java.util.Collection;
6 5
import java.util.HashMap;
7 6
import org.apache.commons.lang3.StringUtils;
8 7
import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
9 8
import org.gvsig.expressionevaluator.Function;
10 9
import org.gvsig.expressionevaluator.MutableSymbolTable;
11
import org.gvsig.tools.script.Script;
12 10

  
13 11
/**
14 12
 *
......
24 22
        super();
25 23
        this.vars = new HashMap<>();
26 24
        this.functions = new HashMap<>();
27
        this.scripts = new ArrayList<>();
25
//        this.scripts = new ArrayList<>();
28 26
        this.init();
29 27
    }
30 28
    
......
69 67
        this.functions.remove(name.toUpperCase());
70 68
    }
71 69

  
72
    @Override
73
    public void addScript(Script script) {
74
        if( script == null ) {
75
            throw new IllegalArgumentException("script can't be null");
76
        }
77
        if (this.scripts.contains(script)) {
78
            return;
79
        }
80
        this.scripts.add(script);
81
    }
70
//    @Override
71
//    public void addScript(Script script) {
72
//        if( script == null ) {
73
//            throw new IllegalArgumentException("script can't be null");
74
//        }
75
//        if (this.scripts.contains(script)) {
76
//            return;
77
//        }
78
//        this.scripts.add(script);
79
//    }
80
//
81
//    @Override
82
//    public void removeScript(Script script) {
83
//        if( script == null ) {
84
//            throw new IllegalArgumentException("script can't be null");
85
//        }
86
//        this.scripts.remove(script);
87
//    }
82 88

  
83 89
    @Override
84
    public void removeScript(Script script) {
85
        if( script == null ) {
86
            throw new IllegalArgumentException("script can't be null");
87
        }
88
        this.scripts.remove(script);
89
    }
90

  
91
    @Override
92 90
    public MutableSymbolTable clone() throws CloneNotSupportedException {
93
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
91
        throw new CloneNotSupportedException("Not supported yet."); 
94 92
    }
95 93
}

Also available in: Unified diff