List of usage examples for java.util Collections emptySet
@SuppressWarnings("unchecked") public static final <T> Set<T> emptySet()
From source file:io.mandrel.OtherTest.java
@Test @SneakyThrows/*from w w w . j av a 2 s . c o m*/ public void dummy() { Event event = Event.forSpider(); event.setText("pouet"); event.getSpider().setSpiderId(1); event.getSpider().setSpiderName("tesss"); event.getSpider().setType(SpiderEventType.SPIDER_CREATED); ObjectMapper mapper = new ObjectMapper(); BindConfiguration.configure(mapper); String res = mapper.writeValueAsString(event); System.err.println(res); // ThriftCodec<LocalDateTime> codec = new ThriftCodec<LocalDateTime>() { // @Override // public void write(LocalDateTime value, TProtocol protocol) throws // Exception { // protocol.writeI64(value.toInstant(ZoneOffset.UTC).toEpochMilli()); // } // // @Override // public LocalDateTime read(TProtocol protocol) throws Exception { // return // LocalDateTime.ofInstant(Instant.ofEpochMilli(protocol.readI64()), // ZoneOffset.UTC); // } // // @Override // public ThriftType getType() { // return ThriftType.I64; // } // }; ThriftCatalog catalog = new ThriftCatalog(); catalog.addDefaultCoercions(Dummy.class); ThriftCodecManager manager = new ThriftCodecManager( new CompilerThriftCodecFactory(ThriftCodecManager.class.getClassLoader()), catalog, Collections.emptySet()); TIOStreamTransport trans = new TIOStreamTransport(System.err); TJSONProtocol protocol = new TJSONProtocol(trans); manager.write(Event.class, event, protocol); manager.write(Uri.class, new Uri("scheme", "userInfo", "host", 0, "path", "query"), protocol); trans.flush(); }
From source file:hudson.plugins.sonar.utils.PathResolverOperatorTest.java
@Test public void testDoResolvePathNoResolver() throws IOException, InterruptedException { resolverOperator.setDefaultPathResolver(null); Set<String> result = resolverOperator.doResolvePath("dummyKey", "dummyValue"); assertEquals(Collections.emptySet(), result); }
From source file:de.shadowhunt.sonar.plugins.ignorecode.batch.IgnoreCoverageMeasurementFilterTest.java
@Test public void testRewrite() throws Exception { final Configuration configuration = Mockito.mock(Configuration.class); final IgnoreCoverageMeasurementFilter filter = new IgnoreCoverageMeasurementFilter(configuration); final Set<Integer> lines = Collections.emptySet(); // unit test/*from w ww. ja v a 2 s . c o m*/ filter.rewrite(new Measure(CoreMetrics.COVERAGE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.COVERED_CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.COVERAGE_LINE_HITS_DATA, 42.0), lines); // integration test filter.rewrite(new Measure(CoreMetrics.IT_COVERAGE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.IT_CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.IT_COVERED_CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.IT_COVERAGE_LINE_HITS_DATA, 42.0), lines); // overall test filter.rewrite(new Measure(CoreMetrics.OVERALL_COVERAGE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.OVERALL_CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.OVERALL_COVERED_CONDITIONS_BY_LINE, 42.0), lines); filter.rewrite(new Measure(CoreMetrics.OVERALL_COVERAGE_LINE_HITS_DATA, 42.0), lines); }
From source file:de.uniba.wiai.kinf.pw.projects.lillytab.reasoner.tbox.TBox.java
/** * @param unfoldee The description to unfold. * @return The unfolding for {@literal unfoldee}. *//*ww w . jav a 2 s . c o m*/ @Override public Collection<IDLClassExpression<I, L, K, R>> getUnfolding(final IDLClassExpression<I, L, K, R> unfoldee) { recalculateIfNeeded(); if (_unfolding.containsKey(unfoldee)) { return _unfolding.get(unfoldee); } else { return Collections.emptySet(); } }
From source file:org.netxilia.api.impl.dependencies.WorkbookDependencyManager.java
public Set<AreaReference> deleteSheet(String sheetName) { SheetDependencyManager mgr = cellDependencyManagers.get(sheetName); if (mgr != null) { Set<AreaReference> affectedAreas = mgr.deleteSheet(); cellDependencyManagers.remove(sheetName); return affectedAreas; }/* w w w . j a va 2 s . com*/ return Collections.emptySet(); }
From source file:it.unibo.alchemist.model.implementations.nodes.CellNodeImpl.java
@Override public Set<CellNode> getNeighborsLinkWithJunction(final Junction j) { if (junctions.get(j) == null) { return Collections.emptySet(); }/*from w w w .j av a 2 s. c o m*/ return new HashSet<>(junctions.get(j).keySet()); }
From source file:org.agiso.tempel.support.test.provider.ArchiveTemplateProviderElement.java
@Override protected Set<String> getRepositoryClassPath() { return Collections.emptySet(); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.scientificCouncil.thesis.ManageSecondCycleThesisSearchBean.java
private Collection<Person> searchStudentNumber(final String number) { if (StringUtils.isNumeric(number)) { final SearchParameters searchParameters = new SearchParameters(); searchParameters.setStudentNumber(new Integer(number)); return search(searchParameters); }//ww w.j av a 2 s .c o m return Collections.emptySet(); }
From source file:com.flexive.war.filter.FxFilter.java
@Override public void init(FilterConfig filterConfig) throws ServletException { this.config = filterConfig; // Get the war deployment directory root on the server file system // Eg. "/opt/jboss-4.0.3RC1/server/default/./tmp/deploy/tmp52986Demo.ear-contents/web.war/" this.FILESYSTEM_WAR_ROOT = filterConfig.getServletContext().getRealPath("/"); final String excluded = config.getInitParameter(PARAM_EXCLUDED_PATHS); if (StringUtils.isNotBlank(excluded)) { this.excludedPaths = Sets.newHashSet(StringUtils.split(excluded, ";'")); LOG.info("Excluded paths from FxFilter: " + this.excludedPaths); } else {/*from w w w .j a v a 2 s . c o m*/ this.excludedPaths = Collections.emptySet(); } }