1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.opencsv.bean.mocks.join;
17
18 import com.opencsv.bean.CsvBindAndJoinByName;
19 import com.opencsv.bean.CsvDate;
20 import java.util.Date;
21 import org.apache.commons.collections4.MultiValuedMap;
22
23
24
25
26
27 public class GoodJoinByNameAnnotations {
28
29 @CsvBindAndJoinByName(column = "index", elementType = Integer.class, required = true, capture = "couldn't possibly match (anything)")
30 private MultiValuedMap<String, Integer> map1;
31
32 @CsvBindAndJoinByName(column = "date[0-9]", elementType = Date.class, locale = "de-DE", required = true)
33 @CsvDate(value = "dd. MMMM yyyy")
34 private MultiValuedMap<String, Date> map2;
35
36 @CsvBindAndJoinByName(column = "regular expression will never match", elementType = String.class)
37 private MultiValuedMap<String, String> map3;
38
39 @CsvBindAndJoinByName(column = "conversion", elementType = Integer.class, locale = "de", capture = "(.*)x", format = "x%s")
40 private MultiValuedMap<String, Integer> map4;
41
42 public MultiValuedMap<String, Integer> getMap1() {
43 return map1;
44 }
45
46 public void setMap1(MultiValuedMap<String, Integer> map1) {
47 this.map1 = map1;
48 }
49
50 public MultiValuedMap<String, Date> getMap2() {
51 return map2;
52 }
53
54 public void setMap2(MultiValuedMap<String, Date> map2) {
55 this.map2 = map2;
56 }
57
58 public MultiValuedMap<String, String> getMap3() {
59 return map3;
60 }
61
62 public void setMap3(MultiValuedMap<String, String> map3) {
63 this.map3 = map3;
64 }
65
66 public MultiValuedMap<String, Integer> getMap4() {
67 return map4;
68 }
69
70 public void setMap4(MultiValuedMap<String, Integer> map4) {
71 this.map4 = map4;
72 }
73 }