Example usage for com.google.common.base Predicates not

List of usage examples for com.google.common.base Predicates not

Introduction

In this page you can find the example usage for com.google.common.base Predicates not.

Prototype

public static <T> Predicate<T> not(Predicate<T> predicate) 

Source Link

Document

Returns a predicate that evaluates to true if the given predicate evaluates to false .

Usage

From source file:com.shanks.learn.user.configuration.SwaggerConfiguration.java

@Bean
public Docket systemDocket() {
    return new Docket(DocumentationType.SWAGGER_2).groupName("System").apiInfo(apiInfo()).select()
            .paths(Predicates.not(PathSelectors.regex("/learn/.*"))).build();
}

From source file:com.aribanilia.rest.util.SwaggerConfig.java

@Bean
public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any())
            .paths(Predicates.not(PathSelectors.regex("/error"))).build().apiInfo(apiInfo())
            .securitySchemes(Collections.singletonList(apiKey()))
            .globalOperationParameters(Collections
                    .singletonList(new ParameterBuilder().name("Authorization").description("Token Oauth 2")
                            .modelRef(new ModelRef("string")).parameterType("header").build()));
}

From source file:org.jclouds.util.Multimaps2.java

public static <K, V> Multimap<K, V> withoutKey(Multimap<K, V> fromMultimap, K key) {
    return Multimaps.<K, V>filterKeys(fromMultimap, Predicates.not(Predicates.equalTo(key)));
}

From source file:org.apache.brooklyn.util.guava.IfFunctions.java

public static <I> IfFunctionBuilderApplyingFirst<I> ifNotEquals(I test) {
    return ifPredicate(Predicates.not(Predicates.equalTo(test)));
}

From source file:com.android.builder.internal.aapt.AaptUtils.java

/**
 * Obtains resource configs that are not densities.
 *
 * @return resource configs that are not recognized as densities as per
 * {@link Density#getEnum(String)}/*w  w  w. j  a  v  a  2s. co  m*/
 */
public static Iterable<String> getNonDensityResConfigs(@NonNull Iterable<String> configs) {
    return Iterables.filter(configs, Predicates.not(IS_DENSITY));
}

From source file:com.smm.rockscissorspaper.configuration.SwaggerConfig.java

/**
 * Creates a Docket for the Swagger UI./*from  www.  j  a v a2  s  .co  m*/
 * @return Docket initialised with the ApiInfo and requests sources.
 */
@Bean
public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
            .apis(RequestHandlerSelectors.any())
            .apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot")))
            .paths(PathSelectors.any()).build();
}

From source file:com.google.devtools.build.lib.skyframe.BuildTargetPatternsResultBuilder.java

@Override
void addLabelsOfNegativePattern(ResolvedTargets<Label> labels) {
    resolvedLabelsBuilder.filter(Predicates.not(Predicates.in(labels.getTargets())));
}

From source file:org.jclouds.util.Multimaps2.java

public static <K, V> Multimap<K, V> withoutKeys(Multimap<K, V> fromMultimap, Set<K> keys) {
    return Multimaps.<K, V>filterKeys(fromMultimap, Predicates.not(Predicates.in(keys)));
}

From source file:org.jclouds.abiquo.predicates.cloud.VolumePredicates.java

public static Predicate<Volume> lesserThan(final long sizeInMb) {
    return Predicates.not(greaterThanOrEqual(sizeInMb));
}

From source file:minium.actions.internal.WaitPredicates.java

/**
 * Predicate to use with {@link WaitWebElements#wait(Predicate)} methods which ensures that
 * evaluation will only be successful when this instance is empty (that is, evaluates
 * to zero {@link org.openqa.selenium.WebElement} instances).
 *
 * @param <T> the generic type/* w ww.j a va2 s  .  c  o m*/
 * @return predicate that returns true if it is empty
 */
public static <T extends Elements> Predicate<T> forExistence() {
    return Predicates.not(WaitPredicates.<T>forUnexistence());
}