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