1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.votering.impl;
10
11 import javax.xml.bind.annotation.XmlEnum;
12 import javax.xml.bind.annotation.XmlEnumValue;
13 import javax.xml.bind.annotation.XmlType;
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 @XmlType(name = "BallotType")
31 @XmlEnum
32 public enum BallotType {
33
34 @XmlEnumValue("huvud")
35 HUVUD("huvud");
36 private final String value;
37
38 BallotType(String v) {
39 value = v;
40 }
41
42 public String value() {
43 return value;
44 }
45
46 public static BallotType fromValue(String v) {
47 for (BallotType c: BallotType.values()) {
48 if (c.value.equals(v)) {
49 return c;
50 }
51 }
52 throw new IllegalArgumentException(v);
53 }
54
55 }