@Test public void testMapEntrySetValue() { final EventList<String> source = new BasicEventList<>(); final Map<Comparable<String>, List<String>> eventMap = GlazedLists.syncEventListToMultiMap(source, new FirstLetterFunction()); source.addAll(GlazedListsTests.delimitedStringToList("James Lemieux Jesse Wilson Jodie Ashford Katie Jiries")); Iterator<Map.Entry<Comparable<String>, List<String>>> entrySetIter = eventMap.entrySet().iterator(); Map.Entry<Comparable<String>, List<String>> entry; assertTrue(entrySetIter.hasNext()); entry = entrySetIter.next(); assertEquals("A", entry.getKey()); assertEquals(GlazedListsTests.delimitedStringToList("Ashford"), entry.getValue()); final List<String> oldEntryValue = entry.getValue(); entry.setValue(GlazedListsTests.delimitedStringToList("Angela Applegate")); assertEquals("A", entry.getKey()); assertEquals(GlazedListsTests.delimitedStringToList("Angela Applegate"), entry.getValue()); assertSame(oldEntryValue, entry.getValue()); try { entry.setValue(GlazedListsTests.delimitedStringToList("Xavier")); fail("failed to receive an IllegalArgumentException for a value to Entry.setValue() that does not produce the correct Entry.getKey()"); } catch (IllegalArgumentException e) { } }
@Override public Set<Entry<K, List<V>>> entrySet() { if (entrySet == null) entrySet = new EntrySet(); return entrySet; }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Set<Entry<K, List<V>>> entrySet() { if (entrySet == null) entrySet = new EntrySet(); return entrySet; } }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Set<Entry<K, List<V>>> entrySet() { if (entrySet == null) entrySet = new EntrySet(); return entrySet; } GroupingListMultiMap(EventList<V> source, FunctionList.Function<V, ? extends K> keyFunction, Comparator<? super K> keyGrouper); }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Set<Entry<K, List<V>>> entrySet() { if (entrySet == null) entrySet = new EntrySet(); return entrySet; } GroupingListMultiMap(EventList<V> source, FunctionList.Function<V, ? extends K> keyFunction, Comparator<? super K> keyGrouper); @Override void dispose(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override List<V> get(Object key); @Override List<V> put(K key, List<V> value); @Override void putAll(Map<? extends K, ? extends List<V>> m); @Override void clear(); @Override List<V> remove(Object key); @Override Collection<List<V>> values(); @Override Set<K> keySet(); @Override Set<Entry<K, List<V>>> entrySet(); @Override boolean equals(Object o); @Override int hashCode(); @Override void listChanged(ListEvent<List<V>> listChanges); }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Set<Entry<K, List<V>>> entrySet() { if (entrySet == null) entrySet = new EntrySet(); return entrySet; } GroupingListMultiMap(EventList<V> source, FunctionList.Function<V, ? extends K> keyFunction, Comparator<? super K> keyGrouper); @Override void dispose(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override List<V> get(Object key); @Override List<V> put(K key, List<V> value); @Override void putAll(Map<? extends K, ? extends List<V>> m); @Override void clear(); @Override List<V> remove(Object key); @Override Collection<List<V>> values(); @Override Set<K> keySet(); @Override Set<Entry<K, List<V>>> entrySet(); @Override boolean equals(Object o); @Override int hashCode(); @Override void listChanged(ListEvent<List<V>> listChanges);  }