Vote count:
2
I wanted to extend LinkedHashMultimap (Guava 16.0.1), mostly to add methods that return commonly used pre-populated maps.
public class MyMap extends LinkedHashMultimap<String, Object> {
}
But, as I learned, most Guava collections are final, and those that are not, don't expose public constructors. What are the possible reasons for this design decision? And what would be the best approach to achieve my goal? The best I can think of is to wrap Multimap methods in my class, but that is far from ideal.
asked 1 min ago
Extending Guava collections
Aucun commentaire:
Enregistrer un commentaire