Revision 46105 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/DefaultExpressionBuilder.java

View differences:

DefaultExpressionBuilder.java
70 70
        public GroupBase(Value value) {
71 71
            this.value = value;
72 72
        }
73
        
74
        @Override
75
       public GroupBase clone() throws CloneNotSupportedException {
76
            GroupBase other = (GroupBase) super.clone();
77
            other.value = value.clone();
78
            return other;
79
        }
73 80

  
74 81
        @Override
75 82
        public Value value() {
......
114 121
            this.name = name;
115 122
            this.builder = builder;
116 123
        }
124
        
125
        public VariableBase clone() throws CloneNotSupportedException {
126
            VariableBase other = (VariableBase) super.clone();
127
            return other;
128
        }    
117 129

  
118 130
        @Override
119 131
        public String name() {
......
165 177
            this.name = null;
166 178
            this.value = null;
167 179
        }
180
        
181
        public ParameterBase clone() throws CloneNotSupportedException {
182
            ParameterBase other = (ParameterBase) super.clone();
183
            return other;
184
        }     
168 185

  
169 186
        @Override
170 187
        public Parameter as_constant() {
......
279 296
            this.builder = builder;
280 297
        }
281 298

  
299
        public Constant clone() throws CloneNotSupportedException {
300
            ConstantBase other = (ConstantBase) super.clone();
301
            return other;
302
        }
303
        
282 304
        @Override
283 305
        public Object value() {
284 306
            return this.value;
......
318 340
        public ExpressionBuilder builder() {
319 341
            return this.builder; // Ojo, no esta en el API.
320 342
        }
343
        
321 344
    }
322 345

  
323 346
    public class CustomBase extends AbstractValue implements Custom {
......
331 354
        public CustomBase(Object value) {
332 355
            this.value = value;
333 356
        }
357
        
358
        public Custom clone() throws CloneNotSupportedException {
359
            CustomBase other = (CustomBase) super.clone();
360
            if(other.values!=null) {
361
                for (int i = 0; i < values.size(); i++) {
362
                    Value v = (Value) values.get(i).clone();
363
                    other.values.set(i, v);
364
                }
365
            }
366
            
367
            return other;
368
        }
334 369

  
335 370
        @Override
336 371
        public void accept(Visitor visitor, VisitorFilter filter) {
......
404 439
            this.name = name;
405 440
            this.format = format;
406 441
        }
442
        
443
        public FunctionBase clone() throws CloneNotSupportedException {
444
            FunctionBase other = (FunctionBase) super.clone();
445
            if (other.parameters != null) {
446
                for (int i = 0; i < parameters.size(); i++) {
447
                    Value v = (Value) parameters.get(i).clone();
448
                    other.parameters.set(i, v);
449
                }
450
            }
407 451

  
452
            return other;
453
        }
454

  
408 455
        public FunctionBase(String name) {
409 456
            this(name,null);
410 457
        }
......
511 558
            super(name);
512 559
            this.instance = instance;
513 560
        }
561
        
562
        public MethodBase clone() throws CloneNotSupportedException {
563
            MethodBase other = (MethodBase) super.clone();
564
            other.instance = instance.clone();
565
            return other;
566
        }
567
        
514 568

  
515 569
        @Override
516 570
        public Value instance() {

Also available in: Unified diff