List of usage examples for com.google.common.base Predicates not
public static <T> Predicate<T> not(Predicate<T> predicate)
From source file:es.upm.oeg.loupe.api.GraphProfiler.java
@Bean public Docket patentApi() { return new Docket(DocumentationType.SWAGGER_2).groupName("loupe-api").apiInfo(getApiInfo()).select() .paths(Predicates.not(PathSelectors.regex("/error"))) // Exclude Spring error controllers .build();//from ww w . ja v a 2s. co m }
From source file:dk.dma.dmiweather.Application.java
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()) .paths(Predicates.not(Predicates.or(PathSelectors.regex("/error"), PathSelectors.regex("/ping"), PathSelectors.regex("/debughealth")))) .build();/*from w w w.j ava2 s . c o m*/ }
From source file:org.basepom.mojo.duplicatefinder.classpath.ClasspathCacheElement.java
void putResources(final Multimap<String, File> resourceMap, final Predicate<String> excludePredicate) { for (final String resource : Collections2.filter(resources, Predicates.not(excludePredicate))) { resourceMap.put(resource, element); }//from w w w.j av a 2 s.com }
From source file:brooklyn.location.affinity.EntityTypeAntiAffinityRule.java
@Override public boolean apply(@Nullable Location input) { Collection<Entity> all = getManagementContext().getEntityManager().getEntities(); return Iterables.all(Iterables.filter(all, entityType), Predicates.not(EntityPredicates.withLocation(input))); }
From source file:com.facebook.presto.sql.planner.plan.MaterializeSampleNode.java
@Override public List<Symbol> getOutputSymbols() { return FluentIterable.from(source.getOutputSymbols()) .filter(Predicates.not(Predicates.equalTo(sampleWeightSymbol))).toList(); }
From source file:org.sonar.erlang.checks.DoNotUseEmptyFlowControlCheck.java
@Override public void init() { subscribeTo(ImmutableList/*from w w w. j a v a 2s . c o m*/ .copyOf(Collections2.filter(flowControls, Predicates.not(Predicates.equalTo(ErlangGrammarImpl.endifAttr)))) .toArray(new ErlangGrammarImpl[flowControls.size() - 1])); }
From source file:ch.bastiangardel.easypay.Application.java
@Bean public Docket EasyPayApi() { return new Docket(DocumentationType.SWAGGER_2).groupName("EasyPay").apiInfo(apiInfo()).select() .apis(RequestHandlerSelectors.any()) .apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot"))) .paths(PathSelectors.any()).build().pathMapping("/") .directModelSubstitute(LocalDate.class, String.class).genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules(newRule( typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))) .useDefaultResponseMessages(false).enableUrlTemplating(false) .tags(new Tag("EasyPay Service", "All apis relating to EasyPay")); }
From source file:org.jclouds.greenqloud.compute.GreenQloudComputeTemplateBuilderLiveTestDisabled.java
@Override protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() { return Predicates.not(new Predicate<OsFamilyVersion64Bit>() { @Override//from w ww .j ava 2 s.c o m public boolean apply(OsFamilyVersion64Bit input) { switch (input.family) { case UBUNTU: return (input.version.equals("") || input.version.equals("10.04") || input.version.equals("11.04") || input.version.equals("11.10")) && input.is64Bit; case DEBIAN: return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit; case CENTOS: return (input.version.equals("") || input.version.equals("5.5") || input.version.equals("5.6") || input.version.equals("6.0")) && input.is64Bit; case FEDORA: return input.version.equals("") && input.is64Bit; default: return false; } } }); }
From source file:com.codeabovelab.dm.cluman.ui.configuration.SwaggerConfiguration.java
private Predicate<String> makePathRegexp() { return Predicates.not(PathSelectors.regex("/error")); }
From source file:com.sight_spot_trip.SwaggerConfig.java
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2).useDefaultResponseMessages(false).select() // .apis(Predicates.and( // Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot")), // withClassAnnotations(RepositoryRestResource.class, RepositoryRestController.class))) .apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot"))) .paths(Predicates.not(PathSelectors.regex("/error.*"))).build() .tags(new Tag("untagged", "This is untagged"), tags()).apiInfo(apiInfo()).protocols(protocols()) .securitySchemes(securitySchemes()).securityContexts(securityContexts()); }