1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.opencsv.bean.mocks.split;
17
18 import com.opencsv.bean.CsvBindAndSplitByName;
19 import com.opencsv.bean.CsvDate;
20 import java.util.Collection;
21 import java.util.Date;
22 import java.util.Deque;
23 import java.util.LinkedList;
24 import java.util.List;
25 import java.util.NavigableSet;
26 import java.util.Queue;
27 import java.util.Set;
28 import java.util.SortedSet;
29
30
31
32
33
34 public class AnnotatedMockBeanCollectionSplit {
35
36 @CsvBindAndSplitByName(elementType = Integer.class, capture = "couldn't possibly match (anything)")
37 private Collection<Integer> collectionType;
38
39 @CsvBindAndSplitByName(collectionType = LinkedList.class, elementType = Integer.class, capture = "[a-z]([0-9])")
40 private List<Integer> listType;
41
42 @CsvBindAndSplitByName(elementType = Date.class)
43 @CsvDate(
44 value = "yyyy-MM-dd",
45 writeFormatEqualsReadFormat = false,
46 writeFormat = "yyyy-MMM-dd",
47 writeChronologyEqualsReadChronology = false,
48 writeChronology = "Japanese")
49 private Set<Date> setType;
50
51 @CsvBindAndSplitByName(elementType = Integer.class, format = "a%sj")
52 private SortedSet<? extends Number> sortedSetType;
53
54 @CsvBindAndSplitByName(elementType = Integer.class)
55 private NavigableSet<Integer> navigableSetType;
56
57 @CsvBindAndSplitByName(elementType = Integer.class)
58 private Queue<Integer> queueType;
59
60 @CsvBindAndSplitByName(elementType = Integer.class)
61 private Deque<Integer> dequeType;
62
63 public Collection<Integer> getCollectionType() {
64 return collectionType;
65 }
66
67 public void setCollectionType(Collection<Integer> collectionType) {
68 this.collectionType = collectionType;
69 }
70
71 public List<Integer> getListType() {
72 return listType;
73 }
74
75 public void setListType(List<Integer> listType) {
76 this.listType = listType;
77 }
78
79 public Set<Date> getSetType() {
80 return setType;
81 }
82
83 public void setSetType(Set<Date> setType) {
84 this.setType = setType;
85 }
86
87 public SortedSet<? extends Number> getSortedSetType() {
88 return sortedSetType;
89 }
90
91 public void setSortedSetType(SortedSet<? extends Number> sortedSetType) {
92 this.sortedSetType = sortedSetType;
93 }
94
95 public NavigableSet<Integer> getNavigableSetType() {
96 return navigableSetType;
97 }
98
99 public void setNavigableSetType(NavigableSet<Integer> navigableSetType) {
100 this.navigableSetType = navigableSetType;
101 }
102
103 public Queue<Integer> getQueueType() {
104 return queueType;
105 }
106
107 public void setQueueType(Queue<Integer> queueType) {
108 this.queueType = queueType;
109 }
110
111 public Deque<Integer> getDequeType() {
112 return dequeType;
113 }
114
115 public void setDequeType(Deque<Integer> dequeType) {
116 this.dequeType = dequeType;
117 }
118 }