Tabnine Logo
ArrayList.removeIf
Code IndexAdd Tabnine to your IDE (free)

How to use
removeIf
method
in
java.util.ArrayList

Best Java code snippets using java.util.ArrayList.removeIf (Showing top 20 results out of 315)

origin: cloudfoundry/uaa

@Override
public boolean revokeApprovalsForUser(String userId, final String zoneId) {
  return store.removeIf(approval -> userId.equals(approval.getUserId()));
}
origin: cloudfoundry/uaa

@Override
public boolean revokeApprovalsForClient(String clientId, final String zoneId) {
  return store.removeIf(approval -> clientId.equals(approval.getClientId()));
}
origin: cloudfoundry/uaa

@Override
public boolean revokeApprovalsForClientAndUser(String clientId, String userId, final String zoneId) {
  return store.removeIf(
    approval ->
      clientId.equals(approval.getClientId()) &&
      userId.equals(approval.getUserId())
  );
}
origin: apache/nifi

@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;
}
origin: leangen/graphql-spqr

public ExtensionList<E> dropAll(Predicate<? super E> filter) {
  super.removeIf(filter);
  return this;
}
origin: shizuchengxuyuan/net.sz.java

@Override
public boolean removeIf(Predicate<? super E> filter) {
  synchronized (this) {
    return super.removeIf(filter); //To change body of generated methods, choose Tools | Templates.
  }
}
origin: badoualy/kotlogram

@Override
public boolean removeIf(Predicate<? super T> filter) {
  return items.removeIf(filter);
}
origin: stackoverflow.com

 public static <T> List<T> conditionalRemove(ArrayList<T> list) {
  list.removeIf(new ConditionCheck<>());
  return list;
}
origin: jillesvangurp/jsonj

@Override
public boolean removeIf(Predicate<? super JsonElement> filter) {
  if(immutable) {
    throw new IllegalStateException("object is immutable");
  }
  return super.removeIf(filter);
}
origin: hneemann/Digital

/**
 * 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);
}
origin: keeps/roda

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;
}
origin: org.basex/basex

/**
 * 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)));
}
origin: BaseXdb/basex

/**
 * 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)));
}
origin: Texera/texera

/**
 * 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;
}
 
origin: com.github.kristiankime/functional-collections

@Override
public GuavaImFList<E> removeIfCp(Predicate<? super E> filter) {
  ArrayList<E> list = toArrayList();
  list.removeIf(filter);
  return new GuavaImFList<E>(ImmutableList.copyOf(list));
}
origin: com.github.kristiankime/functional-collections

@Override
public FList<E> removeIfCp(Predicate<? super E> filter) {
  ArrayList<E> data = Lists.newArrayList(inner);
  data.removeIf(filter);
  return builder(data).build();
}

origin: woefe/ShoppingList

@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;
}
origin: hneemann/Digital

/**
 * 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);
}
origin: chungkwong/MathOCR

public void filterNoise(){
  int threhold=Environment.ENVIRONMENT.getInteger("NOISE_THREHOLD");
  if(threhold>0){
    components.removeIf((c)->c.getWidth()<=threhold&&c.getHeight()<=threhold);
  }
}
/**
origin: Vazkii/Quark

@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");
  }
}
java.utilArrayListremoveIf

Popular methods of ArrayList

  • <init>
  • add
  • size
    Returns the number of elements in this ArrayList.
  • get
    Returns the element at the specified position in this list.
  • toArray
    Returns an array containing all of the elements in this list in proper sequence (from first to last
  • addAll
    Adds the objects in the specified collection to this ArrayList.
  • remove
    Removes the first occurrence of the specified element from this list, if it is present. If the list
  • clear
    Removes all elements from this ArrayList, leaving it empty.
  • isEmpty
    Returns true if this list contains no elements.
  • iterator
    Returns an iterator over the elements in this list in proper sequence.The returned iterator is fail-
  • contains
    Searches this ArrayList for the specified object.
  • set
    Replaces the element at the specified position in this list with the specified element.
  • contains,
  • set,
  • indexOf,
  • clone,
  • subList,
  • stream,
  • ensureCapacity,
  • trimToSize,
  • removeAll,
  • toString

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now