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.doc.MySwaggerConfig.java

@Bean
public Docket restApi() {
    return new Docket(DocumentationType.SWAGGER_2).select()
            .paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")),
                    Predicates.not(ant("/management/**")), Predicates.not(ant("/management*"))))
            .build();//from  ww w  . jav  a  2 s. c o m
}

From source file:com.shanks.spring.boot.configuration.Swagger2Configuration.java

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

From source file:brooklyn.location.jclouds.pool.MachinePoolPredicates.java

public static Predicate<NodeMetadata> except(final Predicate<NodeMetadata> predicateToExclude) {
    return Predicates.not(predicateToExclude);
}

From source file:nl.cwi.swat.jmh_dscg_benchmarks.FootprintUtils.java

public static String measureAndReport(final Object objectToMeasure, final String className, DataType dataType,
        Archetype archetype, boolean supportsStagedMutability, int size, int run,
        MemoryFootprintPreset preset) {/*w  w  w .j  a va 2  s  .c o  m*/
    final Predicate<Object> predicate;

    switch (preset) {
    case DATA_STRUCTURE_OVERHEAD:
        predicate = Predicates.not(Predicates.instanceOf(org.eclipse.imp.pdb.facts.IValue.class));
        break;
    case RETAINED_SIZE:
        predicate = Predicates.alwaysTrue();
        break;
    default:
        throw new IllegalStateException();
    }

    // System.out.println(GraphLayout.parseInstance(objectToMeasure).totalSize());

    long memoryInBytes = objectexplorer.MemoryMeasurer.measureBytes(objectToMeasure, predicate);

    Footprint memoryFootprint = objectexplorer.ObjectGraphMeasurer.measure(objectToMeasure, predicate);

    final String statString = String.format("%d\t %60s\t[%s]\t %s", memoryInBytes, className, dataType,
            memoryFootprint);
    System.out.println(statString);

    final String statFileString = String.format("%d,%d,%s,%s,%s,%b,%d,%d,%d", size, run, className, dataType,
            archetype, supportsStagedMutability, memoryInBytes, memoryFootprint.getObjects(),
            memoryFootprint.getReferences());

    return statFileString;
}

From source file:com.ufcg.DacaApplication.java

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

From source file:com.kamil.Application.java

@Bean
public Docket lottoApi() {
    return new Docket(DocumentationType.SWAGGER_2).groupName("spring-swagger-api").apiInfo(apiInfo()).select()
            .paths(Predicates.not(regex("/error.*"))).build();
}

From source file:com.example.SwaggerConfiger.java

@Bean
public Docket restApi() {
    return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
            .paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")))).build();
}

From source file:controllers.SwaggerConfig.java

@Bean
public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2).select().paths(Predicates.not(PathSelectors.regex("/error")))
            .build()/*from   w w w  .j a va2  s .  com*/

            .apiInfo(apiInfo());
}

From source file:com.khoubyari.example.api.rest.docs.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());
}

From source file:org.trancecode.concurrent.TcFutures.java

public static <T> Iterable<Future<T>> notDone(final Iterable<Future<T>> tasks) {
    final Predicate<Future<T>> filter = FuturePredicates.isDone();
    return Iterables.filter(tasks, Predicates.not(filter));
}