Discards any cached role associations for principals satisfying
the given predicate.

@param predicate a predicate to filter credentials
555557
public void invalidateAll(Predicate<? super P> predicate) {
        final Set<ImmutablePair<P, String>> keys = cache.asMap().keySet().stream()
                .filter(cacheKey -> predicate.test(cacheKey.getLeft()))
                .collect(Collectors.toSet());

        cache.invalidateAll(keys);
    }
109732
public static <K, V> List<V> removeAllIfByKey(Map<K, V> map,
            Predicate<? super K> filter) {
        return map.keySet().stream().filter(filter).collect(toList())
                .stream().map(map::remove).collect(toList());
    }
88269
@Override
  public int retainAll(final KTypePredicate<? super KType> predicate) {
    return removeAll(new KTypePredicate<KType>() {
      public boolean apply(KType value) {
        return !predicate.apply(value);
      };
    });
  }
294384
private void removeFromPermissionsCache(IPermission[] permissions)
            throws AuthorizationException {
        IAuthorizationPrincipal[] principals = getPrincipalsFromPermissions(permissions);
        removeFromPermissionsCache(principals);
    }
1288337
void removeEmptyRole(Grantee role) {

        for (int i = 0; i < map.size(); i++) {
            Grantee grantee = (Grantee) map.get(i);

            grantee.roles.remove(role);
        }
    }
903470
public FirewallPolicyFilter where(Predicate<FirewallPolicyMetadata> predicate) {
        checkNotNull(predicate, "Predicate must be not a null");

        this.predicate = this.predicate.and(predicate);

        return this;
    }
513603
@Override
	public void removeAssociationRow(GraphDatabaseService executionEngine, AssociationKey associationKey, RowKey rowKey) {
		Object[] queryValues = relationshipValues( associationKey, rowKey );
		executionEngine.execute( removeAssociationRowQuery, params( queryValues ) );
	}
878738
public TemplateFilter dataCentersWhere(Predicate<DataCenterMetadata> predicate) {
        checkNotNull(predicate, "Predicate must be not a null");

        dataCenter.where(predicate);
        return this;
    }
851779
@Override
    public boolean removeStoredCredentials() {
        if (!deleteTokens())
            return false;
        IDToken = null;
        refreshToken = null;
        haveSessionCookie = false;
        authURL = null;
        return true;
    }
36936
public List<T> apply(Predicate<T> predicate, List<T> candidates)
    {
        List<T> filtered = new ArrayList<T>(candidates.size());

        for(T entity : candidates)
        {
            if(predicate.appliesTo(entity))
                filtered.add(entity);
        }

        return filtered;
    }
770345
private void removeFromPermissionsCache(IAuthorizationPrincipal[] principals)
            throws AuthorizationException {
        for (int i = 0; i < principals.length; i++) {
            cacheRemove(principals[i]);
        }
    }
307756
public static <T> ActionPredicate<T> fromPredicate(final Predicate<T> predicate) {
	return new ActionPredicate<T>() {
	    public boolean actionPredicate(T obj) {
		return predicate.check(obj);
	    }
	};
    }
869947
private void applyPredicatesForRegisteredItems(final List<PredicateHandler> predicates) {
        ImmutableList.builder()
                .addAll(getEnabledModules())
                .addAll(getEnabledBundles())
                .addAll(getEnabledExtensions())
                .addAll(getEnabledInstallers())
                .build()
                .stream()
                .<ItemInfo>map(this::getInfo)
                .forEach(item -> applyDisablePredicates(predicates, item));
    }
1138480
private void preDelete(MembershipType type) throws Exception
   {
      for (MembershipTypeEventListener listener : listeners)
      {
         listener.preDelete(type);
      }
   }
48606
@Override
	public void clearCache() {
		entityCache.clearCache(CPRuleAssetCategoryRelImpl.class);

		finderCache.clearCache(FINDER_CLASS_NAME_ENTITY);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
	}
641292
public static <T> Predicate<T> not(Predicate<T> predicate) {
        dbc.precondition(predicate != null, "cannot negate a null predicate");
        return predicate.negate();
    }
158237
def remove_filtered_nodes(graph, node_predicates=None):
    
    nodes = list(filter_nodes(graph, node_predicates=node_predicates))
    graph.remove_nodes_from(nodes)