Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Google Collections 有一个Iterables实用程序类,用于接收集合和可迭代并将所有可迭代元素放入集合中,称为addAll. 当您只有一个迭代器时,是否有类似的东西?
addAll
是的Iterators.addAll(Collection, Iterator),不出所料,它被称为 。
Iterators.addAll(Collection, Iterator)