Example usage for org.apache.commons.collections4 PredicateUtils truePredicate

List of usage examples for org.apache.commons.collections4 PredicateUtils truePredicate

Introduction

In this page you can find the example usage for org.apache.commons.collections4 PredicateUtils truePredicate.

Prototype

public static <T> Predicate<T> truePredicate() 

Source Link

Document

Gets a Predicate that always returns true.

Usage

From source file:com.vrem.util.EnumUtils.java

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();
    }//w ww. jav a 2s. co m
    return PredicateUtils.anyPredicate(CollectionUtils.collect(input, transformer));
}

From source file:com.vrem.wifianalyzer.wifi.predicate.FilterPredicate.java

private Predicate<WiFiDetail> makeSSIDPredicate(Set<String> ssids) {
    if (ssids.isEmpty()) {
        return PredicateUtils.truePredicate();
    }//from  ww w.  j  a  v  a 2 s .  co m
    return PredicateUtils.anyPredicate(CollectionUtils.collect(ssids, new SSIDTransformer()));
}