This repository was archived by the owner on Oct 6, 2025. 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 11package ai .timefold .jpyinterpreter ;
22
33import java .util .ArrayList ;
4+ import java .util .Arrays ;
45import java .util .Collections ;
56import java .util .List ;
7+ import java .util .Objects ;
68
79import ai .timefold .jpyinterpreter .types .PythonLikeType ;
810
@@ -31,4 +33,33 @@ public static TypeHint withoutAnnotations(PythonLikeType type) {
3133 return new TypeHint (type , Collections .emptyList ());
3234 }
3335
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+ }
3465}
You can’t perform that action at this time.
0 commit comments