source: java/main/src/main/java/com/framsticks/params/types/FloatParam.java @ 193

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 
1package com.framsticks.params.types;
2
3import com.framsticks.params.CastFailure;
4import com.framsticks.params.ParamBuilder;
5import com.framsticks.params.ReassignResult;
6
7import javax.annotation.concurrent.Immutable;
8
9/**
10 * @author Piotr Sniegowski
11 */
12@Immutable
13public 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.