@Test public void testKeySet() { Set<String> keys = new HashSet<String>(); for (int i = 0; i < Random.getScaleCount(); i++) { String key = Random.getSimpleString(); keys.add(key); map.put(key, randomValueSet()); } for (String key : map.keySet()) { Assert.assertTrue(keys.contains(key)); } Assert.assertTrue(keys.size() == map.keySet().size()); }
@Override public Set<V> put(K key, Set<V> value) { Set<V> stored = newHashSetNullSafe(data.get(key)); if(stored == null) { data.put(key, new ValueSetWrapper(key)); } for (V element : MoreObjects.firstNonNull(stored, Collections.<V> emptySet())) { delete(key, element); } for (V element : value) { insert(key, element); } return stored; }
TrackingMultimap extends AbstractMap<K, Set<V>> { @Override public Set<V> put(K key, Set<V> value) { Set<V> stored = newHashSetNullSafe(data.get(key)); if(stored == null) { data.put(key, new ValueSetWrapper(key)); } for (V element : MoreObjects.firstNonNull(stored, Collections.<V> emptySet())) { delete(key, element); } for (V element : value) { insert(key, element); } return stored; } }
TrackingMultimap extends AbstractMap<K, Set<V>> { @Override public Set<V> put(K key, Set<V> value) { Set<V> stored = newHashSetNullSafe(data.get(key)); if(stored == null) { data.put(key, new ValueSetWrapper(key)); } for (V element : MoreObjects.firstNonNull(stored, Collections.<V> emptySet())) { delete(key, element); } for (V element : value) { insert(key, element); } return stored; } protected  TrackingMultimap(Map<K, Set<V>> delegate,
            @Nullable Comparator<K> comparator); }
TrackingMultimap extends AbstractMap<K, Set<V>> { @Override public Set<V> put(K key, Set<V> value) { Set<V> stored = newHashSetNullSafe(data.get(key)); if(stored == null) { data.put(key, new ValueSetWrapper(key)); } for (V element : MoreObjects.firstNonNull(stored, Collections.<V> emptySet())) { delete(key, element); } for (V element : value) { insert(key, element); } return stored; } protected  TrackingMultimap(Map<K, Set<V>> delegate,
            @Nullable Comparator<K> comparator); boolean containsDataType(DataType type); long count(); boolean delete(K key, V value); double distinctiveness(); @Override Set<Entry<K, Set<V>>> entrySet(); @SuppressWarnings("unchecked") @Override boolean equals(Object obj); @Override Set<V> get(Object key); @Override int hashCode(); boolean hasValue(V value); boolean insert(K key, V value); K max(); Set<V> merge(K key, Set<V> values); K min(); double percentKeyDataType(DataType type); double proportion(K element); @Override Set<V> put(K key, Set<V> value); @SuppressWarnings("unchecked") @Override Set<V> remove(Object key); double spread(); @Override String toString(); double uniqueness(); VariableType variableType(); }
TrackingMultimap extends AbstractMap<K, Set<V>> { @Override public Set<V> put(K key, Set<V> value) { Set<V> stored = newHashSetNullSafe(data.get(key)); if(stored == null) { data.put(key, new ValueSetWrapper(key)); } for (V element : MoreObjects.firstNonNull(stored, Collections.<V> emptySet())) { delete(key, element); } for (V element : value) { insert(key, element); } return stored; } protected  TrackingMultimap(Map<K, Set<V>> delegate,
            @Nullable Comparator<K> comparator); boolean containsDataType(DataType type); long count(); boolean delete(K key, V value); double distinctiveness(); @Override Set<Entry<K, Set<V>>> entrySet(); @SuppressWarnings("unchecked") @Override boolean equals(Object obj); @Override Set<V> get(Object key); @Override int hashCode(); boolean hasValue(V value); boolean insert(K key, V value); K max(); Set<V> merge(K key, Set<V> values); K min(); double percentKeyDataType(DataType type); double proportion(K element); @Override Set<V> put(K key, Set<V> value); @SuppressWarnings("unchecked") @Override Set<V> remove(Object key); double spread(); @Override String toString(); double uniqueness(); VariableType variableType();  }