Java Code Examples for org.apache.commons.collections4.PredicateUtils#truePredicate()

The following examples show how to use org.apache.commons.collections4.PredicateUtils#truePredicate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilterPredicate.java    From WiFiAnalyzer with GNU General Public License v3.0 5 votes vote down vote up
@NonNull
private Predicate<WiFiDetail> makeSSIDPredicate(Set<String> ssids) {
    if (ssids.isEmpty()) {
        return PredicateUtils.truePredicate();
    }
    return PredicateUtils.anyPredicate(CollectionUtils.collect(ssids, new SSIDTransformer()));
}
 
Example 2
Source File: EnumUtils.java    From WiFiAnalyzer with GNU General Public License v3.0 5 votes vote down vote up
@NonNull
public static <T extends Enum, U> Predicate<U> predicate(@NonNull Class<T> enumType, @NonNull Collection<T> input, @NonNull Transformer<T, Predicate<U>> transformer) {
    if (input.size() >= values(enumType).size()) {
        return PredicateUtils.truePredicate();
    }
    return PredicateUtils.anyPredicate(CollectionUtils.collect(input, transformer));
}
 
Example 3
Source File: EnumUtilsTest.java    From WiFiAnalyzer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Predicate<TestObject> transform(TestObject input) {
    return PredicateUtils.truePredicate();
}