@Test public void testEntrySet() { final EventList<String> source = new BasicEventList<>(); final Map<Comparable<String>, List<String>> eventMap = GlazedLists.syncEventListToMultiMap(source, new FirstLetterFunction()); assertTrue(eventMap.isEmpty()); assertTrue(eventMap.entrySet().isEmpty()); source.addAll(GlazedListsTests.delimitedStringToList("James Lemieux Jesse Wilson Jodie Ashford Katie Jiries")); assertEquals(8, source.size()); assertEquals(5, eventMap.size()); assertEquals(5, eventMap.entrySet().size()); assertFalse(eventMap.entrySet().contains(null)); assertTrue(eventMap.entrySet().remove(eventMap.entrySet().iterator().next())); assertEquals(7, source.size()); assertEquals(4, eventMap.size()); assertEquals(4, eventMap.entrySet().size()); assertTrue(eventMap.entrySet().remove(eventMap.entrySet().iterator().next())); assertEquals(3, source.size()); assertEquals(3, eventMap.size()); assertEquals(3, eventMap.entrySet().size()); eventMap.entrySet().clear(); assertEquals(0, source.size()); assertEquals(0, eventMap.size()); assertEquals(0, eventMap.entrySet().size()); assertTrue(source.isEmpty()); assertTrue(eventMap.isEmpty()); assertTrue(eventMap.entrySet().isEmpty()); }
@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);  }