File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
io/src/main/java/com/itextpdf/io/font/otf Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,25 @@ public boolean equals(Object obj) {
378
378
return true ;
379
379
}
380
380
381
+ @ Override
382
+ public int hashCode () {
383
+ int result = 0 ;
384
+ result = 31 *result + start ;
385
+ result = 31 *result + end ;
386
+ for (int i = start ; i < end ; i ++) {
387
+ result = 31 *result + glyphs .get (i ).hashCode ();
388
+ }
389
+ if (null != actualText ) {
390
+ for (int i = start ; i < end ; i ++) {
391
+ result = 31 *result ;
392
+ if (null != actualText .get (i )) {
393
+ result += actualText .get (i ).hashCode ();
394
+ }
395
+ }
396
+ }
397
+ return result ;
398
+ }
399
+
381
400
private void removeGlyph (int index ) {
382
401
glyphs .remove (index );
383
402
if (actualText != null ) {
@@ -440,5 +459,10 @@ public boolean equals(Object obj) {
440
459
ActualText other = (ActualText ) obj ;
441
460
return value == null && other .value == null || value .equals (other .value );
442
461
}
462
+
463
+ @ Override
464
+ public int hashCode () {
465
+ return 31 *value .hashCode ();
466
+ }
443
467
}
444
468
}
You can’t perform that action at this time.
0 commit comments