// if return false the two slots are not equal // if return true the two slots are equal private boolean cmpSlot(ObjectSlot objectSlot1, ObjectSlot objectSlot2) { if (objectSlot1 == null && objectSlot2 == null) { return true; } if ((objectSlot1 != null && objectSlot2 == null) || (objectSlot1 == null && objectSlot2 != null)) { return false; } return objectSlot1.equals(objectSlot2); }