01: package org.gui4j.core.call;
02:
03: import java.util.Map;
04:
05: final class Gui4jAccessDouble extends Gui4jAccessImpl {
06: private final Double mValue;
07:
08: Gui4jAccessDouble(ParseCtx parseCtx, String accessPath) {
09: int startIndex = parseCtx.i;
10: int endIndex = minIndex(accessPath, ";),}", startIndex);
11:
12: String str;
13: if (endIndex != -1) {
14: str = accessPath.substring(startIndex, endIndex);
15: parseCtx.i = endIndex;
16: } else {
17: str = accessPath.substring(startIndex);
18: parseCtx.i = accessPath.length();
19: }
20: mValue = Double.valueOf(str);
21: }
22:
23: Class getResultClass() {
24: return Double.TYPE;
25: }
26:
27: public boolean isConstant() {
28: return true;
29: }
30:
31: public Object getValue(Object baseInstance, Object this Instance,
32: Map paramMap) {
33: return mValue;
34: }
35:
36: }
|