File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
kubernetes/src/main/java/io/kubernetes/client/custom Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import java .io .IOException ;
9
9
import java .math .BigDecimal ;
10
+ import java .util .Objects ;
11
+
12
+ import org .apache .commons .lang3 .ObjectUtils ;
10
13
11
14
@ JsonAdapter (Quantity .QuantityAdapter .class )
12
15
public class Quantity {
@@ -62,6 +65,21 @@ public String toString() {
62
65
'}' ;
63
66
}
64
67
68
+ @ Override
69
+ public boolean equals (Object o ) {
70
+ if (this == o ) {
71
+ return true ;
72
+ }
73
+ if (o == null || getClass () != o .getClass ()) {
74
+ return false ;
75
+ }
76
+
77
+ Quantity otherQuantity = (Quantity ) o ;
78
+
79
+ return ObjectUtils .compare (this .number , otherQuantity .number ) == 0 &&
80
+ Objects .equals (this .format , otherQuantity .format );
81
+ }
82
+
65
83
public class QuantityAdapter extends TypeAdapter <Quantity > {
66
84
@ Override
67
85
public void write (JsonWriter jsonWriter , Quantity quantity ) throws IOException {
You can’t perform that action at this time.
0 commit comments