How to clone a multimap?

1,618 views
Skip to first unread message

David Rosenstrauch

unread,
Nov 17, 2010, 11:31:17 AM11/17/10
to guava-...@googlegroups.com
Is there any way to easily clone a Multimap? I couldn't find any -
e.g., no such method TreeMultimap.clone(), nor Multimaps.clone().

What would be the best way for me to accomplish a cloning/copying
operation for any given type of Multimap? e.g.:

public abstract Multimap clone(Multimap in);

Thanks,

DR

Kevin Bourrillion

unread,
Nov 29, 2010, 12:28:07 PM11/29/10
to David Rosenstrauch, guava-...@googlegroups.com
We're just like the JDK collections in that there's no proper way to do that.  You have to explicitly choose what implementation you want to create, e.g. TreeMultimap.create(otherTreeMultimap).






--
guava-...@googlegroups.com.
http://groups.google.com/group/guava-discuss?hl=en
unsubscribe: guava-discus...@googlegroups.com

This list is for discussion; for help, post to Stack Overflow instead:
http://stackoverflow.com/questions/ask
Use the tag "guava".



--
Kevin Bourrillion @ Google
http://guava-libraries.googlecode.com

Reply all
Reply to author
Forward
0 new messages