Closed GoogleCodeExporter closed 9 years ago
If the supplier's get() is only going to be called once it seems like you can
just omit that.
Iterable has no add() method, so presumably you want to operate on Collections.
I wrote this recently:
public static <T,C extends Collection<T>> C addAll(C col, Iterable<? extends
Collection<? extends T>> values)
{
for (Collection<? extends T> val : values) {
col.addAll(val);
}
return col;
}
So I can do:
Multiset<Mineral> totals =
CollectionUtil.addAll(EnumMultiset.create(Mineral.class),
listOfMineralMultisets);
...which is basically a folding operation.
Original comment by ray.j.gr...@gmail.com
on 11 Oct 2010 at 6:44
I'm not clear on what is really being asked for here. Is it different enough
from that other issue?
Original comment by kevinb@google.com
on 8 Apr 2011 at 2:10
No, not different from issue 218. I shouldn't have submitted this to begin
with :P
Original comment by dan.ro...@gmail.com
on 8 Apr 2011 at 2:45
Original comment by cgdec...@gmail.com
on 8 Apr 2011 at 3:30
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
dan.ro...@gmail.com
on 8 Oct 2010 at 11:58