Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
766 bytes
|
Line | |
---|
1 | package com.framsticks.params.types; |
---|
2 | |
---|
3 | import com.framsticks.params.CastFailure; |
---|
4 | import com.framsticks.params.ParamBuilder; |
---|
5 | import com.framsticks.params.ReassignResult; |
---|
6 | |
---|
7 | import javax.annotation.concurrent.Immutable; |
---|
8 | |
---|
9 | /** |
---|
10 | * @author Piotr Sniegowski |
---|
11 | */ |
---|
12 | @Immutable |
---|
13 | public class FloatParam extends NumberParam<Double> { |
---|
14 | |
---|
15 | /** |
---|
16 | * @param builder |
---|
17 | */ |
---|
18 | public FloatParam(ParamBuilder builder) { |
---|
19 | super(builder.fillDef(0.0).fillStorageType(Double.class)); |
---|
20 | } |
---|
21 | |
---|
22 | @Override |
---|
23 | public Class<?> getStorageType() { |
---|
24 | return Double.class; |
---|
25 | } |
---|
26 | |
---|
27 | @Override |
---|
28 | public ReassignResult<Double> reassign(Object newValue, Object oldValue) throws CastFailure { |
---|
29 | return reassignNumber(newValue, oldValue, Double.class); |
---|
30 | } |
---|
31 | |
---|
32 | @Override |
---|
33 | public String getFramsTypeName() { |
---|
34 | return "f"; |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.