This repository was archived by the owner on Jul 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
jpyinterpreter/src/main/java/ai/timefold/jpyinterpreter Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1
1
package ai .timefold .jpyinterpreter ;
2
2
3
3
import java .util .ArrayList ;
4
+ import java .util .Arrays ;
4
5
import java .util .Collections ;
5
6
import java .util .List ;
7
+ import java .util .Objects ;
6
8
7
9
import ai .timefold .jpyinterpreter .types .PythonLikeType ;
8
10
@@ -31,4 +33,33 @@ public static TypeHint withoutAnnotations(PythonLikeType type) {
31
33
return new TypeHint (type , Collections .emptyList ());
32
34
}
33
35
36
+ @ Override
37
+ public boolean equals (Object o ) {
38
+ if (this == o ) {
39
+ return true ;
40
+ }
41
+ if (!(o instanceof TypeHint typeHint )) {
42
+ return false ;
43
+ }
44
+ return Objects .equals (type , typeHint .type ) && Objects .deepEquals (genericArgs ,
45
+ typeHint .genericArgs )
46
+ && Objects .equals (javaGetterType ,
47
+ typeHint .javaGetterType )
48
+ && Objects .equals (annotationList , typeHint .annotationList );
49
+ }
50
+
51
+ @ Override
52
+ public int hashCode () {
53
+ return Objects .hash (type , annotationList , Arrays .hashCode (genericArgs ), javaGetterType );
54
+ }
55
+
56
+ @ Override
57
+ public String toString () {
58
+ return "TypeHint{" +
59
+ "type=" + type +
60
+ ", annotationList=" + annotationList +
61
+ ", genericArgs=" + Arrays .toString (genericArgs ) +
62
+ ", javaGetterType=" + javaGetterType +
63
+ '}' ;
64
+ }
34
65
}
You can’t perform that action at this time.
0 commit comments