View Javadoc
1   package com.opencsv.bean.mocks.number;
2   
3   import com.opencsv.bean.CsvBindByPosition;
4   import com.opencsv.bean.CsvNumber;
5   
6   import java.math.BigDecimal;
7   import java.math.BigInteger;
8   
9   public class NumberMockColumn {
10  
11      @CsvBindByPosition(position = 0)
12      @CsvNumber(
13              value = "#.#",
14              writeFormatEqualsReadFormat = false,
15              writeFormat = "#.#yeah")
16      private BigDecimal bigDecimal;
17  
18      @CsvBindByPosition(position = 1)
19      @CsvNumber(
20              value = "#",
21              writeFormat = "#.#") // Will be ignored
22      private BigInteger bigInteger;
23  
24      public BigDecimal getBigDecimal() {
25          return bigDecimal;
26      }
27  
28      public void setBigDecimal(BigDecimal bigDecimal) {
29          this.bigDecimal = bigDecimal;
30      }
31  
32      public BigInteger getBigInteger() {
33          return bigInteger;
34      }
35  
36      public void setBigInteger(BigInteger bigInteger) {
37          this.bigInteger = bigInteger;
38      }
39  }