Code example for Collection

Methods: contains

0
				OnContactChangedListener.class, this);
	} 
 
	@Override 
	public void onContactsChanged(Collection<BaseEntity> entities) {
		if (entities.contains(new BaseEntity(account, room)))
			listAdapter.onChange();
	} 
 
	@Override 
	public void onAccountsChanged(Collection<String> accounts) {
		if (accounts.contains(account))
			listAdapter.onChange();
	} 
 
	public static Intent createIntent(Context context, String account,
			String user) {
		return new EntityIntentBuilder(context, OccupantList.class)
				.setAccount(account).setUser(user).build();
	} 
Contextual code suggestions in your IDE  Get Codota for Java