|
28 | 28 | @API(since = "0.6.8", status = Status.MAINTAINED)
|
29 | 29 | public final class JavaDecimalConstraint {
|
30 | 30 | @Nullable
|
31 |
| - private final BigDecimal positiveMin; |
| 31 | + private final BigDecimal min; |
32 | 32 |
|
33 | 33 | @Nullable
|
34 |
| - private final Boolean positiveMinInclusive; |
| 34 | + private final Boolean minInclusive; |
35 | 35 |
|
36 | 36 | @Nullable
|
37 |
| - private final BigDecimal positiveMax; |
| 37 | + private final BigDecimal max; |
38 | 38 |
|
39 | 39 | @Nullable
|
40 |
| - private final Boolean positiveMaxInclusive; |
41 |
| - |
42 |
| - @Nullable |
43 |
| - private final BigDecimal negativeMin; |
44 |
| - |
45 |
| - @Nullable |
46 |
| - private final Boolean negativeMinInclusive; |
47 |
| - |
48 |
| - @Nullable |
49 |
| - private final BigDecimal negativeMax; |
50 |
| - |
51 |
| - @Nullable |
52 |
| - private final Boolean negativeMaxInclusive; |
| 40 | + private final Boolean maxInclusive; |
53 | 41 |
|
54 | 42 | @Nullable
|
55 | 43 | private final Integer scale;
|
56 | 44 |
|
57 | 45 | public JavaDecimalConstraint(
|
58 |
| - @Nullable BigDecimal positiveMin, |
59 |
| - @Nullable Boolean positiveMinInclusive, |
60 |
| - @Nullable BigDecimal positiveMax, |
61 |
| - @Nullable Boolean positiveMaxInclusive, |
62 |
| - @Nullable BigDecimal negativeMin, |
63 |
| - @Nullable Boolean negativeMinInclusive, |
64 |
| - @Nullable BigDecimal negativeMax, |
65 |
| - @Nullable Boolean negativeMaxInclusive, |
| 46 | + @Nullable BigDecimal min, |
| 47 | + @Nullable Boolean minInclusive, |
| 48 | + @Nullable BigDecimal max, |
| 49 | + @Nullable Boolean maxInclusive, |
66 | 50 | @Nullable Integer scale
|
67 | 51 | ) {
|
68 |
| - this.positiveMin = positiveMin; |
69 |
| - this.positiveMinInclusive = positiveMinInclusive; |
70 |
| - this.positiveMax = positiveMax; |
71 |
| - this.positiveMaxInclusive = positiveMaxInclusive; |
72 |
| - this.negativeMin = negativeMin; |
73 |
| - this.negativeMinInclusive = negativeMinInclusive; |
74 |
| - this.negativeMax = negativeMax; |
75 |
| - this.negativeMaxInclusive = negativeMaxInclusive; |
| 52 | + this.min = min; |
| 53 | + this.minInclusive = minInclusive; |
| 54 | + this.max = max; |
| 55 | + this.maxInclusive = maxInclusive; |
76 | 56 | this.scale = scale;
|
77 | 57 | }
|
78 | 58 |
|
79 | 59 | @Nullable
|
80 |
| - public BigDecimal getPositiveMin() { |
81 |
| - return positiveMin; |
82 |
| - } |
83 |
| - |
84 |
| - @Nullable |
85 |
| - public Boolean getPositiveMinInclusive() { |
86 |
| - return positiveMinInclusive; |
87 |
| - } |
88 |
| - |
89 |
| - @Nullable |
90 |
| - public BigDecimal getPositiveMax() { |
91 |
| - return positiveMax; |
92 |
| - } |
93 |
| - |
94 |
| - @Nullable |
95 |
| - public Boolean getPositiveMaxInclusive() { |
96 |
| - return positiveMaxInclusive; |
97 |
| - } |
98 |
| - |
99 |
| - @Nullable |
100 |
| - public BigDecimal getNegativeMin() { |
101 |
| - return negativeMin; |
| 60 | + public BigDecimal getMin() { |
| 61 | + return min; |
102 | 62 | }
|
103 | 63 |
|
104 | 64 | @Nullable
|
105 |
| - public Boolean getNegativeMinInclusive() { |
106 |
| - return negativeMinInclusive; |
| 65 | + public Boolean getMinInclusive() { |
| 66 | + return minInclusive; |
107 | 67 | }
|
108 | 68 |
|
109 | 69 | @Nullable
|
110 |
| - public BigDecimal getNegativeMax() { |
111 |
| - return negativeMax; |
| 70 | + public BigDecimal getMax() { |
| 71 | + return max; |
112 | 72 | }
|
113 | 73 |
|
114 | 74 | @Nullable
|
115 |
| - public Boolean getNegativeMaxInclusive() { |
116 |
| - return negativeMaxInclusive; |
| 75 | + public Boolean getMaxInclusive() { |
| 76 | + return maxInclusive; |
117 | 77 | }
|
118 | 78 |
|
119 | 79 | @Nullable
|
|
0 commit comments