1 | |
package org.kuali.rice.core.api.util.jaxb; |
2 | |
|
3 | |
import javax.xml.bind.annotation.XmlAccessType; |
4 | |
import javax.xml.bind.annotation.XmlAccessorType; |
5 | |
import javax.xml.bind.annotation.XmlAttribute; |
6 | |
import javax.xml.bind.annotation.XmlElement; |
7 | |
import javax.xml.bind.annotation.XmlElementWrapper; |
8 | |
import javax.xml.bind.annotation.XmlType; |
9 | |
import java.io.Serializable; |
10 | |
import java.util.ArrayList; |
11 | |
import java.util.List; |
12 | |
import java.util.Map; |
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
@XmlAccessorType(XmlAccessType.NONE) |
22 | |
@XmlType(name = "MultiValuedStringMapEntryType") |
23 | |
public final class MultiValuedStringMapEntry implements Serializable { |
24 | |
|
25 | |
private static final long serialVersionUID = -9609663434312103L; |
26 | |
|
27 | |
@XmlAttribute(name = "key") |
28 | |
private final String key; |
29 | |
|
30 | |
@XmlElementWrapper(name = "values") |
31 | |
@XmlElement(name = "value") |
32 | |
private final List<String> values; |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
@SuppressWarnings("unused") |
38 | 0 | MultiValuedStringMapEntry() { |
39 | 0 | this.key = null; |
40 | 0 | this.values = null; |
41 | 0 | } |
42 | |
|
43 | 0 | public MultiValuedStringMapEntry(String key, List<String> values) { |
44 | 0 | this.key = key; |
45 | 0 | this.values = values; |
46 | 0 | } |
47 | |
|
48 | 0 | public MultiValuedStringMapEntry(Map.Entry<String, List<String>> entry) { |
49 | 0 | this.key = entry.getKey(); |
50 | 0 | this.values = new ArrayList<String>(entry.getValue()); |
51 | 0 | } |
52 | |
|
53 | |
public String getKey() { |
54 | 0 | return this.key; |
55 | |
} |
56 | |
|
57 | |
public List<String> getValues() { |
58 | 0 | return this.values; |
59 | |
} |
60 | |
|
61 | |
} |