/** * Test equality of contact to chat room wrapper. This method does not rely on a chat room * instance, since that may not be available in case of removal. * * @param contact the contact * @param chatRoomWrapper the chat room wrapper * @return returns <tt>true</tt> if they are equal, or <tt>false</tt> if they are different. */ private boolean contactEqualsChatRoom( final ChatRoomSourceContact contact, final ChatRoomWrapper chatRoomWrapper) { return contact.getProvider() == chatRoomWrapper.getParentProvider().getProtocolProvider() && contact.getContactAddress().equals(chatRoomWrapper.getChatRoomID()); }