,
public boolean equals(Object obj)
{
ClassName pro = (ClassName) obj;
return this.getPro() == pro.getPro() && this.getTeam() == pro.getTeam();
}
, hashCode() , equals() (, -t24 > null). . equals hashCode Java . ,
@Override public boolean equals(Object obj) {
if (obj == this) return true;
if (!(obj instanceof ClassName)) return false;
ClassName pro = (ClassName)obj;
<sometype> thisPro = getPro();
if (thisPro == null || !thisPro.equals(pro.getPro()) return false;
<sometype> thisTeam = getTeam();
if (thisTeam == null || !thisTeam.equals(pro.getTeam()) return false;
return true;
}