@Test public void testMapEntrySetValue() { final EventList<String> source = new BasicEventList<>(); final Map<String, String> eventMap = GlazedLists.syncEventListToMap(source, new FirstLetterFunction()); source.addAll(GlazedListsTests.delimitedStringToList("James Lemieux Andy Depue Holger Brands")); Iterator<Map.Entry<String, String>> entrySetIter = eventMap.entrySet().iterator(); Map.Entry<String, String> entry; assertTrue(entrySetIter.hasNext()); entry = entrySetIter.next(); assertEquals("J", entry.getKey()); assertEquals("James", entry.getValue()); entry.setValue("Jesse"); assertEquals("J", entry.getKey()); assertEquals("Jesse", entry.getValue()); try { entry.setValue("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, V>> entrySet() { if (this.entrySet == null) this.entrySet = new EntrySet(); return this.entrySet; }
FunctionListMap implements DisposableMap<K, V> { @Override public Set<Entry<K, V>> entrySet() { if (this.entrySet == null) this.entrySet = new EntrySet(); return this.entrySet; } }
FunctionListMap implements DisposableMap<K, V> { @Override public Set<Entry<K, V>> entrySet() { if (this.entrySet == null) this.entrySet = new EntrySet(); return this.entrySet; } FunctionListMap(EventList<V> source, FunctionList.Function<V, K> keyFunction); }
FunctionListMap implements DisposableMap<K, V> { @Override public Set<Entry<K, V>> entrySet() { if (this.entrySet == null) this.entrySet = new EntrySet(); return this.entrySet; } FunctionListMap(EventList<V> source, FunctionList.Function<V, K> keyFunction); @Override void dispose(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override void clear(); @Override V remove(Object key); @Override Collection<V> values(); @Override Set<K> keySet(); @Override Set<Entry<K, V>> entrySet(); @Override void forEach(BiConsumer<? super K, ? super V> action); @Override boolean equals(Object o); @Override int hashCode(); }
FunctionListMap implements DisposableMap<K, V> { @Override public Set<Entry<K, V>> entrySet() { if (this.entrySet == null) this.entrySet = new EntrySet(); return this.entrySet; } FunctionListMap(EventList<V> source, FunctionList.Function<V, K> keyFunction); @Override void dispose(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override void clear(); @Override V remove(Object key); @Override Collection<V> values(); @Override Set<K> keySet(); @Override Set<Entry<K, V>> entrySet(); @Override void forEach(BiConsumer<? super K, ? super V> action); @Override boolean equals(Object o); @Override int hashCode();  }