gpt4 book ai didi

java - 从 Iterator 创建 List 实例

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:29:11 24 4
gpt4 key购买 nike

有人知道是否有从 Iterator 实例创建 List 的标准方法吗?

最佳答案

我倾向于 Guava's Lists.newArrayList(Iterator)因为我通常将 Guava 作为依赖项,而且它已经存在。

关于java - 从 Iterator<T> 创建 List<T> 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11018325/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com