Revision 43809 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/DefaultToken.java
DefaultToken.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.gvsig.expressionevaluator.LexicalAnalyzer.Token; |
4 | 4 |
|
5 |
|
|
6 | 5 |
public class DefaultToken implements Token { |
7 | 6 |
|
8 | 7 |
private int type; |
9 |
String literal; |
|
8 |
private String literal;
|
|
10 | 9 |
private Object value; |
11 | 10 |
|
12 | 11 |
public DefaultToken() { |
13 | 12 |
} |
14 | 13 |
|
14 |
@Override |
|
15 |
public Token clone() throws CloneNotSupportedException { |
|
16 |
// We will assume that the properties of the class are immutable, so |
|
17 |
// it would suffice to call the super class. |
|
18 |
DefaultToken other = (DefaultToken) super.clone(); |
|
19 |
return other; |
|
20 |
} |
|
21 |
|
|
22 |
|
|
23 |
@Override |
|
15 | 24 |
public void set(int type, String literal) { |
16 | 25 |
this.set(type, literal, literal); |
17 | 26 |
} |
18 | 27 |
|
28 |
@Override |
|
19 | 29 |
public void set(int type, String literal, Object value) { |
20 | 30 |
this.literal = literal; |
21 | 31 |
this.type = type; |
22 | 32 |
this.value = value; |
23 | 33 |
} |
24 | 34 |
|
35 |
@Override |
|
25 | 36 |
public int getType() { |
26 | 37 |
return type; |
27 | 38 |
} |
28 | 39 |
|
40 |
@Override |
|
29 | 41 |
public Object getValue() { |
30 | 42 |
return value; |
31 | 43 |
} |
32 | 44 |
|
45 |
@Override |
|
33 | 46 |
public String getLiteral() { |
34 | 47 |
return literal; |
35 | 48 |
} |
36 | 49 |
|
50 |
public void setLiteral(String literal) { |
|
51 |
this.literal = literal; |
|
52 |
} |
|
53 |
|
|
37 | 54 |
} |
Also available in: Unified diff