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:
598 bytes
|
Rev | Line | |
---|
[77] | 1 | package com.framsticks.params.types; |
---|
| 2 | |
---|
| 3 | import java.util.List; |
---|
| 4 | |
---|
[87] | 5 | import com.framsticks.params.ParamBuilder; |
---|
| 6 | |
---|
| 7 | import javax.annotation.concurrent.Immutable; |
---|
| 8 | |
---|
[77] | 9 | /** |
---|
| 10 | * @author Piotr Sniegowski |
---|
| 11 | */ |
---|
[87] | 12 | @Immutable |
---|
[77] | 13 | public class EnumParam extends DecimalParam { |
---|
| 14 | |
---|
| 15 | |
---|
[87] | 16 | protected final List<String> enums; |
---|
| 17 | |
---|
[77] | 18 | /** |
---|
| 19 | * This constructor exists because EnumParam is different package than ParamBuilder. |
---|
| 20 | * |
---|
| 21 | * @param enums |
---|
| 22 | */ |
---|
[87] | 23 | public EnumParam(ParamBuilder builder) { |
---|
| 24 | super(builder); |
---|
| 25 | this.enums = builder.getEnumValues(); |
---|
| 26 | assert(this.enums != null); |
---|
[77] | 27 | } |
---|
| 28 | |
---|
| 29 | public List<String> getElements() { |
---|
| 30 | return enums; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.