@Test public void testValues() { final EventList<String> source = new BasicEventList<>(); final Map<? extends Comparable, List<String>> eventMap = GlazedLists.syncEventListToMultiMap(source, new FirstLetterFunction()); assertTrue(eventMap.values().isEmpty()); source.addAll(GlazedListsTests.delimitedStringToList("Jesse Wilson James Lemieux")); assertEquals(3, eventMap.values().size()); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Jesse James"))); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Lemieux"))); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Wilson"))); eventMap.values().add(GlazedListsTests.delimitedStringToList("Katie")); eventMap.values().add(GlazedListsTests.delimitedStringToList("Jiries")); assertEquals(4, eventMap.size()); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Jesse James Jiries"))); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Katie"))); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Lemieux"))); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Wilson"))); eventMap.values().remove(GlazedListsTests.delimitedStringToList("Jesse James Jiries")); eventMap.values().remove(GlazedListsTests.delimitedStringToList("Katie")); eventMap.values().remove(GlazedListsTests.delimitedStringToList("Lemieux")); assertEquals(1, eventMap.size()); assertTrue(eventMap.values().contains(GlazedListsTests.delimitedStringToList("Wilson"))); }
@Override public Collection<List<V>> values() { return groupingList; }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Collection<List<V>> values() { return groupingList; } }
GroupingListMultiMap implements DisposableMap<K, List<V>>, ListEventListener<List<V>> { @Override public Collection<List<V>> values() { return groupingList; } 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 Collection<List<V>> values() { return groupingList; } 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 Collection<List<V>> values() { return groupingList; } 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);  }