remove All filtered value from Collection by Predicate - Android java.util

Android examples for java.util:Collection Filter

Description

remove All filtered value from Collection by Predicate

Demo Code


//package com.book2s;

import java.util.Collection;

import java.util.function.Predicate;

public class Main {
    public static <T> void removeAll(Collection<T> toRemoveFrom,
            Predicate<T> predicate) {
        toRemoveFrom.removeIf(predicate);
    }/*from  www .  ja  v  a2 s  .co  m*/
}

Related Tutorials