1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.ancientprogramming.fixedformat4j.format.data;
17
18 import com.ancientprogramming.fixedformat4j.annotation.FixedFormatDecimal;
19 import static com.ancientprogramming.fixedformat4j.annotation.FixedFormatDecimal.*;
20
21
22
23
24
25
26
27 public class FixedFormatDecimalData {
28
29 private int decimals;
30 private boolean useDecimalDelimiter;
31 private char decimalDelimiter;
32 public static final FixedFormatDecimalData DEFAULT = new FixedFormatDecimalData(DECIMALS, USE_DECIMAL_DELIMITER, DECIMAL_DELIMITER);
33
34 public FixedFormatDecimalData(int decimals, boolean useDecimalDelimiter, char decimalDelimiter) {
35 this.decimals = decimals;
36 this.useDecimalDelimiter = useDecimalDelimiter;
37 this.decimalDelimiter = decimalDelimiter;
38 }
39
40 public int getDecimals() {
41 return decimals;
42 }
43
44 public boolean isUseDecimalDelimiter() {
45 return useDecimalDelimiter;
46 }
47
48 public char getDecimalDelimiter() {
49 return decimalDelimiter;
50 }
51
52
53 public String toString() {
54 return "FixedFormatDecimalData{" +
55 "decimals=" + decimals +
56 ", useDecimalDelimiter=" + useDecimalDelimiter +
57 ", decimalDelimiter='" + decimalDelimiter + "'" +
58 '}';
59 }
60 }