View Javadoc
1   /*
2    * Copyright 2017 Andrew Rucker Jones.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.opencsv.bean.mocks.split;
17  
18  import com.opencsv.bean.CsvBindAndSplitByName;
19  import java.util.Stack;
20  
21  import org.apache.commons.collections4.Bag;
22  import org.apache.commons.collections4.SortedBag;
23  
24  /**
25   *
26   * @author Andrew Rucker Jones
27   */
28  public class DerivedMockBeanCollectionSplit extends AnnotatedMockBeanCollectionSplit {
29      
30      @CsvBindAndSplitByName(elementType = Integer.class)
31      private Bag<Integer> bagType;
32      
33      @CsvBindAndSplitByName(elementType = Integer.class)
34      private SortedBag<Integer> sortedBagType;
35      
36      @CsvBindAndSplitByName(elementType = Integer.class)
37      private IntegerSetSortedToString nonparameterizedCollectionType;
38      
39      @CsvBindAndSplitByName(elementType = Integer.class, splitOn = "[a-z]+")
40      private Stack<Integer> stackType;
41  
42      public Bag<Integer> getBagType() {
43          return bagType;
44      }
45  
46      public void setBagType(Bag<Integer> bagType) {
47          this.bagType = bagType;
48      }
49  
50      public SortedBag<Integer> getSortedBagType() {
51          return sortedBagType;
52      }
53  
54      public void setSortedBagType(SortedBag<Integer> sortedBagType) {
55          this.sortedBagType = sortedBagType;
56      }
57  
58      public IntegerSetSortedToString getNonparameterizedCollectionType() {
59          return nonparameterizedCollectionType;
60      }
61  
62      public void setNonparameterizedCollectionType(IntegerSetSortedToString nonparameterizedCollectionType) {
63          this.nonparameterizedCollectionType = nonparameterizedCollectionType;
64      }
65  
66      public Stack<Integer> getStackType() {
67          return stackType;
68      }
69  
70      public void setStackType(Stack<Integer> stackType) {
71          this.stackType = stackType;
72      }
73  }