source: java/main/src/main/java/com/framsticks/params/types/DecimalParam.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: 773 bytes
RevLine 
[77]1package com.framsticks.params.types;
2
3import com.framsticks.params.CastFailure;
[87]4import com.framsticks.params.ParamBuilder;
[84]5import com.framsticks.params.ReassignResult;
[77]6
[87]7import javax.annotation.concurrent.Immutable;
8
[77]9/**
10 * @author Piotr Sniegowski
11 */
[87]12@Immutable
[84]13public class DecimalParam extends NumberParam<Integer> {
[77]14
[87]15        /**
16         * @param builder
17         */
18        public DecimalParam(ParamBuilder builder) {
[88]19                super(builder.fillDef(0).fillStorageType(Integer.class));
[77]20        }
21
22        @Override
[84]23        public Class<?> getStorageType() {
[77]24                return Integer.class;
25        }
26
[84]27        @Override
28        public ReassignResult<Integer> reassign(Object newValue, Object oldValue) throws CastFailure {
29                return reassignNumber(newValue, oldValue, Integer.class);
30        }
[77]31
[84]32        @Override
33        public String getFramsTypeName() {
34                return "d";
35        }
[77]36
37
38}
Note: See TracBrowser for help on using the repository browser.