private <K extends Object, T extends Object> ListMultimap<K, T> duplicatesMultimap() { return Multimaps2.<K, T>newLinkedHashListMultimap(); }
/** * Constructs an {@code ArrayListMultimap} with the same mappings as the specified multimap. It uses a linked map * internally.. * * @param multimap * the multimap whose contents are copied to this multimap */ public static <K, V> ListMultimap<K, V> newLinkedHashListMultimap(Multimap<K, V> multimap) { int keySetSize = multimap.keySet().size(); int expectedKeys = Math.max(keySetSize, 2); ListMultimap<K, V> result = newLinkedHashListMultimap(expectedKeys, Math.max(3, multimap.size() / expectedKeys)); result.putAll(multimap); return result; }
ListMultimap<DispatchSignature, JvmOperation> result = Multimaps2.newLinkedHashListMultimap(2,4); Iterable<JvmOperation> operations = type.getDeclaredOperations(); ITypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type);