Perhaps Guava's Iterables.concat
would meet your needs?
java collection backed up by multiple collections
-
22-07-2023 - |
题
I have two collections: coll1
and coll2
. I need a collection coll
which is the union of the two, but I don't want to allocate a new collection. I simply what coll
to represent a view of the two collection, and to forward calls to them.
Is there a library which offer this?
解决方案
不隶属于 StackOverflow