List of usage examples for com.google.common.base Predicates not
public static <T> Predicate<T> not(Predicate<T> predicate)
From source file:org.basepom.mojo.duplicatefinder.classpath.ClasspathCacheElement.java
void putClasses(final Multimap<String, File> classMap, final Predicate<String> excludePredicate) { for (final String className : Collections2.filter(classes, Predicates.not(excludePredicate))) { classMap.put(className, element); }//from w w w. j a va 2 s. c om }
From source file:net.hillsdon.reviki.configuration.PropertiesPerWikiConfiguration.java
public List<File> getOtherSearchIndexDirectories() { Iterable<WikiConfiguration> otherWikis = Iterables.filter(_deploymentConfiguration.getWikis(), Predicates.not(Predicates.<WikiConfiguration>equalTo(this))); return Lists.newArrayList(Iterables.transform(otherWikis, WikiConfiguration.TO_SEARCH_INDEX_DIR)); }
From source file:io.swagger.sample.Application.java
@Bean public Docket swaggerSpringMvcPlugin() { return new Docket(DocumentationType.SWAGGER_2).useDefaultResponseMessages(false).apiInfo(apiInfo()).select() .paths(Predicates.not(PathSelectors.regex("/error.*"))).build(); }
From source file:org.trnltk.testutil.testmatchers.ParseResultsEqualMatcher.java
@Override public boolean matchesSafely(Collection<String> item) { if (ignoreVerbPresA3Sg) // filter out some verb results to make the test have less results item = Collections2.filter(item, Predicates.not(Predicates.containsPattern("\\Zero\\+Pres\\+"))); return CollectionUtils.isEqualCollection(expectedParseResults, item); }
From source file:com.redpacket.server.SwaggerConfig.java
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2).useDefaultResponseMessages(false).select() .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()); }
From source file:com.enerbos.cloud.resource.config.SwaggerConfig.java
@Bean public Docket swaggerSpringMvcPlugin() { return new Docket(DocumentationType.SWAGGER_2) .useDefaultResponseMessages(false).apiInfo(apiInfo()).select().paths(Predicates .and(Predicates.not(PathSelectors.regex("/error.*")), PathSelectors.regex("/auth/.*"))) .build();/*from w ww . ja v a 2 s .co m*/ }
From source file:eu.lp0.cursus.scoring.scores.impl.GenericOverallPointsData.java
@Override protected int calculateOverallPoints(Pilot pilot) { int points = 0; // Add race points but not discards for (Entry<Race, Integer> racePoints : Maps.filterKeys(scores.getRacePoints(pilot), Predicates.not(Predicates.in(scores.getDiscardedRaces(pilot)))).entrySet()) { points += racePoints.getValue(); }/*from w w w.j a v a 2 s. c o m*/ // Add all penalties (this includes race penalties) points += scores.getOverallPenalties(pilot); if (points < 0) { points = 0; } return points; }
From source file:com.ngdata.sep.tools.monitoring.ReplicationStatus.java
public Collection<String> getPeers() { return Collections2.filter(statusByPeerAndServer.keySet(), Predicates.not(RECOVERED_QUEUE_PREDICATE)); }
From source file:ua.com.serzh.controllers.SwaggerConfig.java
@Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) // Docket, Springfoxs, primary api configuration mechanism is initialized for swagger specification 2.0 .apiInfo(apiInfo()).select() // method returns an instance of ApiSelectorBuilder, which provides a way to control the endpoints exposed by Swagger. .apis(RequestHandlerSelectors.any())// allows selection of RequestHandlers using a predicate. The example here uses an `any predicate (default). Out of the box predicates provided are any, none, withClassAnnotation, withMethodAnnotation and basePackage. .paths(Predicates.not(PathSelectors.regex("/error.*")))// Avoiding default basic-error-controller from swagger api .paths(PathSelectors.any())// allows selection of Paths using a predicate. The example here uses an `any predicate (default) .build();/* w w w . j a va 2s. c o m*/ }
From source file:org.polarsys.reqcycle.traceability.utils.LazyMap.java
public LazyMap(Iterator<Pair<Link, Reachable>> resultOfEngine) { this.resultOfEngine = resultOfEngine; if (resultOfEngine.hasNext()) { next = resultOfEngine.next();//from w w w .j a v a2 s . c o m Reachable first = getSource(next); Predicate<Reachable> equalTo = Predicates.equalTo(first); addIf(equalTo, Predicates.not(equalTo)); } }