Improve performance of equals
This commit is contained in:
parent
45e42d7243
commit
4c1e9b4119
|
@ -52,11 +52,9 @@ public abstract class ContextGetterDecl extends Decl {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if ( obj==null ) return false;
|
if ( this==obj ) return true;
|
||||||
// A() and label A are different
|
// A() and label A are different
|
||||||
if ( !(obj instanceof ContextGetterDecl) ) return false;
|
if ( !(obj instanceof ContextGetterDecl) ) return false;
|
||||||
if ( this==obj ) return true;
|
|
||||||
if ( this.hashCode() != obj.hashCode() ) return false;
|
|
||||||
return
|
return
|
||||||
name.equals(((Decl) obj).name) &&
|
name.equals(((Decl) obj).name) &&
|
||||||
getArgType().equals(((ContextGetterDecl) obj).getArgType());
|
getArgType().equals(((ContextGetterDecl) obj).getArgType());
|
||||||
|
|
Loading…
Reference in New Issue