/** * Compares the slot ID and the module_ of this object with the slot ID and * module_ of the other object. Returns only true, if both are equal. * * @param otherObject * The other Slot object. * @return True, if other is an instance of Slot and the slot ID and module_ * of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof Slot)) { return false; } Slot other = (Slot) otherObject; return (this.slotID == other.slotID) && this.module.equals(other.module); }