1
2
3
4
5
6
7 package org.asyrinx.joey.gen.model;
8
9
10 /***
11 * @author takeshi
12 */
13 public abstract class AbstractEnumeration extends ElementSet {
14
15 /***
16 *
17 */
18 public AbstractEnumeration() {
19 super((String) null);
20 }
21
22 /***
23 *
24 */
25 public AbstractEnumeration(Element parent, String name) {
26 this(parent, name, "int");
27 }
28
29 /***
30 *
31 */
32 public AbstractEnumeration(Element parent, String name, String type) {
33 super(parent, name);
34 this.valueType = type;
35 }
36
37
38
39
40
41
42 public boolean isEntity() {
43 return true;
44 }
45
46 private String valueType = "int";
47
48
49
50
51
52
53 public void add(EnumerationEntry entry) {
54 super.add(entry);
55 }
56
57
58
59
60
61
62 public boolean contains(EnumerationEntry entry) {
63 return super.contains(entry);
64 }
65
66
67
68
69
70
71 public EnumerationEntry getEntry(int index) {
72 return (EnumerationEntry) super.getElement(index);
73 }
74
75
76
77
78
79
80 public EnumerationEntry getEntry(String name) {
81 return (EnumerationEntry) super.getElement(name);
82 }
83
84
85
86
87
88
89 public EnumerationEntry removeEntry(String name) {
90 return (EnumerationEntry) super.removeElement(name);
91 }
92
93 /***
94 * @return Returns the valueType.
95 */
96 public String getValueType() {
97 return valueType;
98 }
99
100 /***
101 * @param valueType
102 * The valueType to set.
103 */
104 public void setValueType(String type) {
105 this.valueType = type;
106 }
107 }