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

项目:ogham    文件:ImplementationSelectionTests.java   
@Before
public void setUp() throws IOException {
    SimpleClasspathHelper helper = new SimpleClasspathHelper();
    helper.setClassLoader(new FilterableClassLoader(getClass().getClassLoader(), new NotPredicate<>(new EqualPredicate<>("javax.mail.Transport"))));
    ClasspathUtils.setHelper(helper);
    Properties additionalProps = new Properties();
    additionalProps.setProperty("mail.smtp.host", ServerSetupTest.SMTP.getBindAddress());
    additionalProps.setProperty("mail.smtp.port", String.valueOf(ServerSetupTest.SMTP.getPort()));
    oghamService = MessagingBuilder.standard()
            .environment()
                .properties("/application.properties")
                .properties(additionalProps)
                .and()
            .build();
}
项目:imcms    文件:TemplateMapper.java   
public Collection<TemplateDomainObject> getTemplatesInGroup(TemplateGroupDomainObject templateGroup) {
    String[] params = new String[]{String.valueOf(templateGroup.getId())};
    return CollectionUtils
            .select(services.getProcedureExecutor()
                            .executeProcedure(SPROC_GET_TEMPLATES_IN_GROUP, params, newArrayListHandler()),
                    NotPredicate.notPredicate(NullPredicate.INSTANCE));
}
项目:HCFCore    文件:PredicateUtils.java   
/**
 * Create a new Predicate that returns true if the specified predicate
 * returns false and vice versa.
 *
 * @param <T>  the type that the predicate queries
 * @param predicate  the predicate to not
 * @return the <code>not</code> predicate
 * @throws NullPointerException if the predicate is null
 * @see NotPredicate
 */
public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) {
    return NotPredicate.notPredicate(predicate);
}
项目:HCFCore    文件:PredicateUtils.java   
/**
 * Create a new Predicate that returns true if the specified predicate
 * returns false and vice versa.
 *
 * @param <T>  the type that the predicate queries
 * @param predicate  the predicate to not
 * @return the <code>not</code> predicate
 * @throws NullPointerException if the predicate is null
 * @see NotPredicate
 */
public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) {
    return NotPredicate.notPredicate(predicate);
}