List of usage examples for com.google.common.collect LinkedHashMultimap replaceValues
@Override public Set<V> replaceValues(@Nullable K key, Iterable<? extends V> values)
If values is not empty and the multimap already contains a mapping for key , the keySet() ordering is unchanged.
From source file:io.helixservice.core.util.VertxTypeConverter.java
/** * Vert.x MultiMap to Guava Multimap./* www . j ava2s.c om*/ * Primarily used for request and response headers. * * @param multiMap Vert.x multimap * @return Multimap converted to Guava Multimap */ static Multimap<String, String> toGuavaMultimap(MultiMap multiMap) { LinkedHashMultimap<String, String> result = LinkedHashMultimap.create(); for (String key : multiMap.names()) { result.replaceValues(key, multiMap.getAll(key)); } return result; }