src/main/java/de/unixwork/uwproj/OptionDefault.java

changeset 0
38775db5fdf5
child 40
b42bfc9e9983
equal deleted inserted replaced
-1:000000000000 0:38775db5fdf5
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;
7
8 /**
9 *
10 * @author olaf
11 */
12 public class OptionDefault {
13 private Option option;
14 private String value;
15 private String platform;
16
17 public OptionDefault(Option opt) {
18 option = opt;
19 }
20
21 public String getValueName() {
22 return value;
23 }
24
25 public void setValueName(String value) {
26 this.value = value;
27 }
28
29 public String getPlatform() {
30 return platform;
31 }
32
33 public void setPlatform(String platform) {
34 this.platform = platform;
35 }
36
37 public String getFunc() {
38 return option.getValueFunc(value);
39 }
40
41 public OptionValue getValue() {
42 for(OptionValue val : option.getValues()) {
43 if(val.getValue().equals(value)) {
44 return val;
45 }
46 }
47 return null;
48 }
49 }

mercurial