@Override public boolean revokeApprovalsForUser(String userId, final String zoneId) { return store.removeIf(approval -> userId.equals(approval.getUserId())); }
@Override public boolean revokeApprovalsForClient(String clientId, final String zoneId) { return store.removeIf(approval -> clientId.equals(approval.getClientId())); }
@Override public boolean revokeApprovalsForClientAndUser(String clientId, String userId, final String zoneId) { return store.removeIf( approval -> clientId.equals(approval.getClientId()) && userId.equals(approval.getUserId()) ); }
@Parameterized.Parameters(name = "{index}: {0}") public static Collection<TestParams> data() { Map<Integer, int[]> typeWithPrecisionRange = new HashMap<>(); typeWithPrecisionRange.put(TINYINT, range(1,3)); typeWithPrecisionRange.put(SMALLINT, range(1,5)); typeWithPrecisionRange.put(INTEGER, range(1,9)); ArrayList<TestParams> params = new ArrayList<>(); typeWithPrecisionRange.forEach( (sqlType, precisions) -> { for (int precision : precisions) { params.add(new TestParams(sqlType, precision, SIGNED)); params.add(new TestParams(sqlType, precision, UNSIGNED)); } }); // remove cases that we know should fail params.removeIf(param -> param.sqlType == INTEGER && param.precision == 9 && param.signed == UNSIGNED ); return params; }
public ExtensionList<E> dropAll(Predicate<? super E> filter) { super.removeIf(filter); return this; }
@Override public boolean removeIf(Predicate<? super E> filter) { synchronized (this) { return super.removeIf(filter); //To change body of generated methods, choose Tools | Templates. } }
@Override public boolean removeIf(Predicate<? super T> filter) { return items.removeIf(filter); }
public static <T> List<T> conditionalRemove(ArrayList<T> list) { list.removeIf(new ConditionCheck<>()); return list; }
@Override public boolean removeIf(Predicate<? super JsonElement> filter) { if(immutable) { throw new IllegalStateException("object is immutable"); } return super.removeIf(filter); }
/** * Removes all observers from the given class * * @param observerClass the class of observers to remove */ public void removeObserver(Class<? extends Observer> observerClass) { observers.removeIf(observer -> observer.getClass() == observerClass); }
public List<String> getAipIds(String transferredResource) { ArrayList<String> ret; List<String> aipIds = transferredResourceToAipIds.get(transferredResource); if (aipIds != null) { ret = new ArrayList<>(aipIds); ret.removeIf(s -> s.equals(Report.NO_OUTCOME_OBJECT_ID)); } else { ret = new ArrayList<>(); } return ret; }
/** * Removes all jobs with the specified id from the list. * @param id job id */ public void remove(final String id) { list.removeIf(job -> id.equals(job.options.get(JobsOptions.ID))); }
/** * Removes all jobs with the specified id from the list. * @param id job id */ public void remove(final String id) { list.removeIf(job -> id.equals(job.options.get(JobsOptions.ID))); }
/** * Removes an attribute from the schema builder if it exists. * * @param attribute, the name of the attribute * @return this Builder object */ public Builder removeIfExists(String attribute) { checkNotNull(attribute); attributeList.removeIf((Attribute attr) -> attr.getName().equalsIgnoreCase(attribute)); attributeNames.remove(attribute.toLowerCase()); return this; }
@Override public GuavaImFList<E> removeIfCp(Predicate<? super E> filter) { ArrayList<E> list = toArrayList(); list.removeIf(filter); return new GuavaImFList<E>(ImmutableList.copyOf(list)); }
@Override public FList<E> removeIfCp(Predicate<? super E> filter) { ArrayList<E> data = Lists.newArrayList(inner); data.removeIf(filter); return builder(data).build(); }
@Override public boolean removeIf(Predicate<? super ListItem> filter) { boolean b = false; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { b = super.removeIf(filter); } if (b) { notifyListChanged(Event.newOther()); } return b; }
/** * Removes the given state * * @param state the state to remove */ public void remove(State state) { states.remove(state); transitions.removeIf(t -> t.getStartState() == state || t.getTargetState() == state); wasModified(state, Movable.Property.REMOVED); }
public void filterNoise(){ int threhold=Environment.ENVIRONMENT.getInteger("NOISE_THREHOLD"); if(threhold>0){ components.removeIf((c)->c.getWidth()<=threhold&&c.getHeight()<=threhold); } } /**
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { if(event.player instanceof EntityPlayerMP) { ArrayList<IRecipe> recipes = Lists.newArrayList(CraftingManager.REGISTRY); recipes.removeIf((recipe) -> ignored.contains(recipe.getRegistryName().toString()) || recipe.getRecipeOutput().isEmpty()); ((EntityPlayerMP) event.player).unlockRecipes(recipes); if(forceLimitedCrafting) event.player.world.getGameRules().setOrCreateGameRule("doLimitedCrafting", "true"); } }