1 | {↵ | | 1 | {↵
|
2 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵ | | 2 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵
|
3 | if (!t.getBaseType().equals(BASETYPE.FLOAT)) {↵ | | 3 | if (!t.getBaseType().equals(BASETYPE.DATE)) {↵
|
4 | throw new IllegalArgumentException("attribute <" + theName + ","↵ | | 4 | throw new IllegalArgumentException("attribute <" + theName + ","↵
|
5 | + theNamespace + "> is not of type Float");↵ | | 5 | + theNamespace + "> is not of type Date");↵
|
6 | }↵ | | 6 | }↵
|
|
7 | setObject(theName, theNamespace, value);↵ | | 7 | setObject(theName, theNamespace, value);↵
|
8 | }↵ | | 8 | }↵
|
|
9 | public double getDouble(final String theName, final String theNamespace) {↵ | | 9 | public float getFloat(final String theName, final String theNamespace) {↵
|
10 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵ | | 10 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵
|
11 | if (!t.getBaseType().equals(BASETYPE.DOUBLE)) {↵ | | 11 | if (!t.getBaseType().equals(BASETYPE.FLOAT)) {↵
|
12 | throw new IllegalArgumentException("attribute <" + theName + ","↵ | | 12 | throw new IllegalArgumentException("attribute <" + theName + ","↵
|
13 | + theNamespace + "> is not of type Double");↵ | | 13 | + theNamespace + "> is not of type Float");↵
|
14 | }↵ | | 14 | }↵
|
|
15 | return (Double) getObject(theName, theNamespace);↵ | | 15 | return (Float) getObject(theName, theNamespace);↵
|
16 | }↵ | | 16 | }↵
|
|
17 | public void setDouble(final String theName, final String theNamespace,↵ | | 17 | public void setFloat(final String theName, final String theNamespace,↵
|
18 | final double value) {↵ | | 18 | final float value) {↵
|
19 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵ | | 19 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵
|
20 | if (!t.getBaseType().equals(BASETYPE.DOUBLE)) {↵ | | 20 | if (!t.getBaseType().equals(BASETYPE.FLOAT)) {↵
|
21 | throw new IllegalArgumentException("attribute <" + theName + ","↵ | | 21 | throw new IllegalArgumentException("attribute <" + theName + ","↵
|
22 | + theNamespace + "> is not of type Double");↵ | | 22 | + theNamespace + "> is not of type Float");↵
|
23 | }↵ | | 23 | }↵
|
24 | setObject(theName, theNamespace, value);↵ | | 24 | setObject(theName, theNamespace, value);↵
|
25 | | | 25 |
|