scala.collection.Iterator.toList()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(285)

本文整理了Java中scala.collection.Iterator.toList()方法的一些代码示例,展示了Iterator.toList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Iterator.toList()方法的具体详情如下:
包路径:scala.collection.Iterator
类名称:Iterator
方法名:toList

Iterator.toList介绍

暂无

代码示例

代码示例来源:origin: info.kwarc.sally4.mhw/mhw-mmt

  1. @Override
  2. public List<String> getMMTConstants() {
  3. List<String> result = new ArrayList<String>();
  4. info.kwarc.mmt.api.ontology.IsConstant$ t = info.kwarc.mmt.api.ontology.IsConstant$.MODULE$;
  5. for (Path p : JavaConversions.asJavaCollection(controller.depstore().getInds(t).toList())) {
  6. result.add(p.toPath());
  7. }
  8. return result;
  9. }

代码示例来源:origin: info.kwarc.sally4.mhw/mhw-mmt

  1. @Override
  2. public List<String> getMMTTheories() {
  3. List<String> result = new ArrayList<String>();
  4. info.kwarc.mmt.api.ontology.IsTheory$ t = info.kwarc.mmt.api.ontology.IsTheory$.MODULE$;
  5. for (Path p : JavaConversions.asJavaCollection(controller.depstore().getInds(t).toList())) {
  6. result.add(p.toPath());
  7. }
  8. return result;
  9. }

代码示例来源:origin: pinterest/doctorkafka

  1. public void startAdminHttpService() {
  2. try {
  3. Properties properties = new Properties();
  4. properties.load(this.getClass().getResource("build.properties").openStream());
  5. LOG.info("build.properties build_revision: {}",
  6. properties.getProperty("build_revision", "unknown"));
  7. } catch (Throwable t) {
  8. LOG.warn("Failed to load properties from build.properties", t);
  9. }
  10. Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
  11. Iterator<Duration> durationIterator = Arrays.asList(defaultLatchIntervals).iterator();
  12. @SuppressWarnings("deprecation")
  13. AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
  14. this.port,
  15. 20,
  16. List$.MODULE$.empty(),
  17. Option.empty(),
  18. List$.MODULE$.empty(),
  19. Map$.MODULE$.empty(),
  20. JavaConversions.asScalaIterator(durationIterator).toList());
  21. RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
  22. AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
  23. for (Map.Entry<String, CustomHttpHandler> entry : this.customHttpHandlerMap.entrySet()) {
  24. service.httpServer().createContext(entry.getKey(), entry.getValue());
  25. }
  26. }

代码示例来源:origin: com.github.pinterest/kafkastats

  1. public void startAdminHttpService() {
  2. try {
  3. Properties properties = new Properties();
  4. properties.load(this.getClass().getResource("build.properties").openStream());
  5. LOG.info("build.properties build_revision: {}",
  6. properties.getProperty("build_revision", "unknown"));
  7. } catch (Throwable t) {
  8. LOG.warn("Failed to load properties from build.properties", t);
  9. }
  10. Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
  11. Iterator<Duration> durationIterator = Arrays.asList(defaultLatchIntervals).iterator();
  12. @SuppressWarnings("deprecation")
  13. AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
  14. this.port,
  15. 20,
  16. List$.MODULE$.empty(),
  17. Option.empty(),
  18. List$.MODULE$.empty(),
  19. Map$.MODULE$.empty(),
  20. JavaConversions.asScalaIterator(durationIterator).toList());
  21. RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
  22. AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
  23. for (Map.Entry<String, CustomHttpHandler> entry : this.customHttpHandlerMap.entrySet()) {
  24. service.httpServer().createContext(entry.getKey(), entry.getValue());
  25. }
  26. }

相关文章