1 /* |
|
2 * To change this license header, choose License Headers in Project Properties. |
|
3 * To change this template file, choose Tools | Templates |
|
4 * and open the template in the editor. |
|
5 */ |
|
6 package de.unixwork.uwproj; |
1 package de.unixwork.uwproj; |
7 |
2 |
8 /** |
|
9 * |
|
10 * @author olaf |
|
11 */ |
|
12 public class OptionDefault { |
3 public class OptionDefault { |
13 private Option option; |
4 private final Option option; |
14 private String value; |
5 private String value; |
15 private String platform; |
6 private String platform; |
16 |
7 |
17 public OptionDefault(Option opt) { |
8 public OptionDefault(Option opt) { |
18 option = opt; |
9 option = opt; |
19 } |
10 } |
20 |
11 |
21 public String getValueName() { |
12 public String getValueName() { |
22 return value; |
13 return value; |
23 } |
14 } |
24 |
15 |
25 public void setValueName(String value) { |
16 public void setValueName(String value) { |
31 } |
22 } |
32 |
23 |
33 public void setPlatform(String platform) { |
24 public void setPlatform(String platform) { |
34 this.platform = platform; |
25 this.platform = platform; |
35 } |
26 } |
36 |
27 |
37 public String getFunc() { |
28 public String getFunc() { |
38 return option.getValueFunc(value); |
29 return option.getValueFunc(value); |
39 } |
30 } |
40 |
31 |
41 public OptionValue getValue() { |
32 public OptionValue getValue() { |
42 for(OptionValue val : option.getValues()) { |
33 for (OptionValue val : option.getValues()) { |
43 if(val.getValue().equals(value)) { |
34 if (val.getValue().equals(value)) { |
44 return val; |
35 return val; |
45 } |
36 } |
46 } |
37 } |
47 return null; |
38 return null; |
48 } |
39 } |