Java HashMap.containsKey() ne fait pas appel equals()

J'ai une table de hachage:

Map<LotWaferBean, File> hm = new HashMap<LotWaferBean, File>();

LotWaferBean lw = new LotWaferBean();
... //populate lw
if (!hm.containsKey((LotWaferBean) lw)) {
  hm.put(lw, triggerFiles[l]);
}

Le code pour LotWaferBean:

@Override
public boolean equals(Object o) {
        if (!(o instanceof LotWaferBean)) {
              return false;
        }
        if (((LotWaferBean) o).getLotId().equals(lotId)
                    && ((LotWaferBean) o).getWaferNo() == waferNo) {
              return true;
        }
        return false;
  }

Dans mon IDE j'ai mis des points d'arrêt dans equals() mais il n'est jamais exécutée. Pourquoi?

InformationsquelleAutor Will Sumekar | 2011-01-06