}
@Override
public boolean equals(Object obj) {
+ // I don't know why the default equals generated by Eclipse does not work.
+ // instead of relying on bt.equals(other.bt), we have to compare the hashcodes of those objects.
if (this == obj)
return true;
if (obj == null)
if (bt == null) {
if (other.bt != null)
return false;
- } else if (!bt.equals(other.bt))
+ } else if (other.bt == null)
return false;
- return true;
+ return bt.hashCode() == other.bt.hashCode();
}
}