Hi Thomas Thanks very much for your reply. I'll look forward to version 4.1, but in the meantime I'll go with your suggested code.
Thanks again, -- Ryan > Hello all > > > > I am having trouble understanding how to use a custom value collection > type > > with a MultiValueMap... > > Hi Ryan, > > we know that the MultiValueMap is flawed for several reasons, but we are > working on adding a revamped variant in 4.1, see the issue: > > https://issues.apache.org/jira/browse/COLLECTIONS-508 > > The best thing you can do right now is to instantiate it in the > pre-generics way: > > @SuppressWarnings({ "rawtypes", "unchecked" }) > MultiValueMap<String, String> orderedMap > = MapUtils.multiValueMap(new LinkedHashMap(), LinkedHashSet.class); > > You actually need type-safety for orderedMap, not for the argument to > multiValueMap. The need to suppress warnings is annoying, but with 4.1 > this should also go away. > > Thomas >
