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

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

本文整理了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

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

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

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

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

public void startAdminHttpService() {
 try {
  Properties properties = new Properties();
  properties.load(this.getClass().getResource("build.properties").openStream());
  LOG.info("build.properties build_revision: {}",
    properties.getProperty("build_revision", "unknown"));
 } catch (Throwable t) {
  LOG.warn("Failed to load properties from build.properties", t);
 }
 Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
 Iterator<Duration> durationIterator = Arrays.asList(defaultLatchIntervals).iterator();
 @SuppressWarnings("deprecation")
 AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
   this.port,
   20,
   List$.MODULE$.empty(),
   Option.empty(),
   List$.MODULE$.empty(),
   Map$.MODULE$.empty(),
   JavaConversions.asScalaIterator(durationIterator).toList());
 RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
 AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
 for (Map.Entry<String, CustomHttpHandler> entry : this.customHttpHandlerMap.entrySet()) {
  service.httpServer().createContext(entry.getKey(), entry.getValue());
 }
}

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

public void startAdminHttpService() {
 try {
  Properties properties = new Properties();
  properties.load(this.getClass().getResource("build.properties").openStream());
  LOG.info("build.properties build_revision: {}",
    properties.getProperty("build_revision", "unknown"));
 } catch (Throwable t) {
  LOG.warn("Failed to load properties from build.properties", t);
 }
 Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
 Iterator<Duration> durationIterator = Arrays.asList(defaultLatchIntervals).iterator();
 @SuppressWarnings("deprecation")
 AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
   this.port,
   20,
   List$.MODULE$.empty(),
   Option.empty(),
   List$.MODULE$.empty(),
   Map$.MODULE$.empty(),
   JavaConversions.asScalaIterator(durationIterator).toList());
 RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
 AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
 for (Map.Entry<String, CustomHttpHandler> entry : this.customHttpHandlerMap.entrySet()) {
  service.httpServer().createContext(entry.getKey(), entry.getValue());
 }
}

相关文章