forked from JavaTX/JavaCompilerCore
Add Hashcode methods
This commit is contained in:
parent
b45964ed5f
commit
8d25920a87
@ -43,7 +43,7 @@ public class GatherNames {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(typeDecl.classDeclaration().normalClassDeclaration() != null){
|
if(typeDecl.classDeclaration().normalClassDeclaration() != null){
|
||||||
if(pkgName != ""){
|
if(!pkgName.isEmpty()){
|
||||||
nameString = pkgName + "." + typeDecl.classDeclaration().normalClassDeclaration().Identifier().toString();
|
nameString = pkgName + "." + typeDecl.classDeclaration().normalClassDeclaration().Identifier().toString();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -64,6 +64,10 @@ public class TypePlaceholder extends RefTypeOrTPHOrWildcardOrGeneric
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return this.getName().hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -114,6 +114,7 @@ public abstract class UnifyType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
|
if(obj == null)return false;
|
||||||
return this.toString().equals(obj.toString());
|
return this.toString().equals(obj.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user