src/share/classes/com/sun/tools/javac/code/Types.java

changeset 507
dbcba45123cd
parent 356
d5f6c475f475
child 554
9d9f26857129
child 561
e9ef849ae0ed
equal deleted inserted replaced
506:85242c273d31 507:dbcba45123cd
2502 this.t1 = t1; 2502 this.t1 = t1;
2503 this.t2 = t2; 2503 this.t2 = t2;
2504 } 2504 }
2505 @Override 2505 @Override
2506 public int hashCode() { 2506 public int hashCode() {
2507 return 127 * Types.this.hashCode(t1) + Types.this.hashCode(t2); 2507 return 127 * Types.hashCode(t1) + Types.hashCode(t2);
2508 } 2508 }
2509 @Override 2509 @Override
2510 public boolean equals(Object obj) { 2510 public boolean equals(Object obj) {
2511 if (!(obj instanceof TypePair)) 2511 if (!(obj instanceof TypePair))
2512 return false; 2512 return false;
3373 final Type t; 3373 final Type t;
3374 SingletonType(Type t) { 3374 SingletonType(Type t) {
3375 this.t = t; 3375 this.t = t;
3376 } 3376 }
3377 public int hashCode() { 3377 public int hashCode() {
3378 return Types.this.hashCode(t); 3378 return Types.hashCode(t);
3379 } 3379 }
3380 public boolean equals(Object obj) { 3380 public boolean equals(Object obj) {
3381 return (obj instanceof SingletonType) && 3381 return (obj instanceof SingletonType) &&
3382 isSameType(t, ((SingletonType)obj).t); 3382 isSameType(t, ((SingletonType)obj).t);
3383 } 3383 }

mercurial