Java 类org.apache.commons.collections.functors.NotPredicate 实例源码

项目:incubator-atlas    文件:FilterUtil.java   
public static Predicate getPredicateFromSearchFilter(SearchFilter searchFilter) {
    List<Predicate> predicates = new ArrayList<>();

    final String type         = searchFilter.getParam(SearchFilter.PARAM_TYPE);
    final String name         = searchFilter.getParam(SearchFilter.PARAM_NAME);
    final String supertype    = searchFilter.getParam(SearchFilter.PARAM_SUPERTYPE);
    final String notSupertype = searchFilter.getParam(SearchFilter.PARAM_NOT_SUPERTYPE);

    // Add filter for the type/category
    if (StringUtils.isNotBlank(type)) {
        predicates.add(getTypePredicate(type));
    }

    // Add filter for the name
    if (StringUtils.isNotBlank(name)) {
        predicates.add(getNamePredicate(name));
    }

    // Add filter for the supertype
    if (StringUtils.isNotBlank(supertype)) {
        predicates.add(getSuperTypePredicate(supertype));
    }

    // Add filter for the supertype negation
    if (StringUtils.isNotBlank(notSupertype)) {
        predicates.add(new NotPredicate(getSuperTypePredicate(notSupertype)));
    }

    return PredicateUtils.allPredicate(predicates);
}
项目:imcms    文件:UserDomainObject.java   
private void removePhoneNumbersOfType(PhoneNumberType phoneNumberType) {
    CollectionUtils.filter(phoneNumbers, new NotPredicate(new PhoneNumberOfTypePredicate(phoneNumberType)));
}
项目:spring-rich-client    文件:ValangRichValidator.java   
void visit(NotPredicate p) {
    Assert.isTrue(p.getPredicates().length == 1);
    doVisit(p.getPredicates()[0]);
}
项目:spring-richclient    文件:ValangRichValidator.java   
void visit(NotPredicate p) {
    Assert.isTrue(p.getPredicates().length == 1);
    doVisit(p.getPredicates()[0]);
}