33import com .sngular .annotation .pact .Example ;
44import com .sngular .annotation .pact .PactDslBodyBuilder ;
55
6+ import java .math .BigInteger ;
7+ import java .math .BigDecimal ;
8+
69@ PactDslBodyBuilder
710public class NumericDataTypes {
811
@@ -18,17 +21,35 @@ public class NumericDataTypes {
1821 @ Example ("40" )
1922 private long primitiveLong ;
2023
21- // @Example("50")
22- // private Float floatObject;
23- //
24- // @Example("60")
25- // private float primitiveFloat;
26- //
27- // @Example("70")
28- // private BigInteger bigInteger;
29- //
30- // @Example("80")
31- // private BigDecimal bigDecimal;
24+ @ Example ("50.1234" )
25+ private Float floatObject ;
26+
27+ @ Example ("60.2345" )
28+ private float primitiveFloat ;
29+
30+ @ Example ("70.3456" )
31+ private Double doubleObject ;
32+
33+ @ Example ("80.4567" )
34+ private double primitiveDouble ;
35+
36+ @ Example ("90" )
37+ private Short shortObject ;
38+
39+ @ Example ("100" )
40+ private short primitiveShort ;
41+
42+ @ Example ("110" )
43+ private Byte byteObject ;
44+
45+ @ Example ("120" )
46+ private byte primitiveByte ;
47+
48+ @ Example ("1303812548123548216" )
49+ private BigInteger bigIntegerObject ;
50+
51+ @ Example ("1402354872534672834.2345" )
52+ private BigDecimal bigDecimalObject ;
3253
3354 protected Integer getInteger () {
3455 return integer ;
@@ -61,4 +82,84 @@ protected long getPrimitiveLong() {
6182 protected void setPrimitiveLong (final long primitiveLong ) {
6283 this .primitiveLong = primitiveLong ;
6384 }
85+
86+ public Float getFloatObject () {
87+ return floatObject ;
88+ }
89+
90+ public void setFloatObject (Float floatObject ) {
91+ this .floatObject = floatObject ;
92+ }
93+
94+ public float getPrimitiveFloat () {
95+ return primitiveFloat ;
96+ }
97+
98+ public void setPrimitiveFloat (float primitiveFloat ) {
99+ this .primitiveFloat = primitiveFloat ;
100+ }
101+
102+ public Double getDoubleObject () {
103+ return doubleObject ;
104+ }
105+
106+ public void setDoubleObject (Double doubleObject ) {
107+ this .doubleObject = doubleObject ;
108+ }
109+
110+ public double getPrimitiveDouble () {
111+ return primitiveDouble ;
112+ }
113+
114+ public void setPrimitiveDouble (double primitiveDouble ) {
115+ this .primitiveDouble = primitiveDouble ;
116+ }
117+
118+ public Short getShortObject () {
119+ return shortObject ;
120+ }
121+
122+ public void setShortObject (Short shortObject ) {
123+ this .shortObject = shortObject ;
124+ }
125+
126+ public short getPrimitiveShort () {
127+ return primitiveShort ;
128+ }
129+
130+ public void setPrimitiveShort (short primitiveShort ) {
131+ this .primitiveShort = primitiveShort ;
132+ }
133+
134+ public Byte getByteObject () {
135+ return byteObject ;
136+ }
137+
138+ public void setByteObject (Byte byteObject ) {
139+ this .byteObject = byteObject ;
140+ }
141+
142+ public byte getPrimitiveByte () {
143+ return primitiveByte ;
144+ }
145+
146+ public void setPrimitiveByte (byte primitiveByte ) {
147+ this .primitiveByte = primitiveByte ;
148+ }
149+
150+ public BigInteger getBigIntegerObject () {
151+ return bigIntegerObject ;
152+ }
153+
154+ public void setBigIntegerObject (BigInteger bigIntegerObject ) {
155+ this .bigIntegerObject = bigIntegerObject ;
156+ }
157+
158+ public BigDecimal getBigDecimalObject () {
159+ return bigDecimalObject ;
160+ }
161+
162+ public void setBigDecimalObject (BigDecimal bigDecimalObject ) {
163+ this .bigDecimalObject = bigDecimalObject ;
164+ }
64165}
0 commit comments