@Override public boolean containsKey(Object key) { synchronized (this.lock) { return this.getDelegate().containsKey(key); } }
int actualSize = mutableMapIterable.size(); if (actualSize != expectedSize) int keySetSize = mutableMapIterable.keySet().size(); if (keySetSize != expectedSize) int valuesSize = mutableMapIterable.values().size(); if (valuesSize != expectedSize) int entrySetSize = mutableMapIterable.entrySet().size(); if (entrySetSize != expectedSize)
@Override public V get(Object key) { synchronized (this.lock) { return this.getDelegate().get(key); } }
if (map.put(key, each) != null) (r1, r2) -> r2.forEachKeyValue((key, value) -> if (r1.put(key, value) != null)
@Override public V put(K key, V value) { synchronized (this.lock) { return this.getDelegate().put(key, value); } }
@Override public RichIterable<Pair<K, V>> keyValuesView() { synchronized (this.lock) { Set<Entry<K, V>> entries = this.getDelegate().entrySet(); Iterable<Pair<K, V>> pairs = Iterate.collect(entries, AbstractImmutableEntry.getPairFunction()); return LazyIterate.adapt(pairs); } }
/** * @since 9.0 */ @Override default <V1, P> MutableBag<V1> countByWith(Function2<? super V, ? super P, ? extends V1> function, P parameter) { return this.asLazy().<P, V1>collectWith(function, parameter).toBag(); }
@Override public <KK, VV> MutableMap<KK, VV> aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator) { synchronized (this.lock) { return this.getDelegate().aggregateInPlaceBy(groupBy, zeroValueFactory, mutatingAggregator); } }
@Override public void clear() { synchronized (this.lock) { this.getDelegate().clear(); } }
protected Object readResolve() { return this.map.asSynchronized(); } }
@Override public boolean containsValue(Object value) { synchronized (this.lock) { return this.getDelegate().containsValue(value); } }
@Override public <KK, VV> MutableMap<KK, VV> aggregateBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV, ? super V, ? extends VV> nonMutatingAggregator) { synchronized (this.lock) { return this.getDelegate().aggregateBy(groupBy, zeroValueFactory, nonMutatingAggregator); } }
@Override public V put(K key, V value) { synchronized (this.lock) { return this.getDelegate().put(key, value); } }
if (map.put(key, each) != null) (r1, r2) -> r2.forEachKeyValue((key, value) -> if (r1.put(key, value) != null)
@Override public RichIterable<Pair<K, V>> keyValuesView() { synchronized (this.lock) { Set<Entry<K, V>> entries = this.getDelegate().entrySet(); Iterable<Pair<K, V>> pairs = Iterate.collect(entries, AbstractImmutableEntry.getPairFunction()); return LazyIterate.adapt(pairs); } }
/** * @since 10.0.0 */ @Override default <V1> MutableBag<V1> countByEach(Function<? super V, ? extends Iterable<V1>> function) { return this.asLazy().flatCollect(function).toBag(); }
@Override public <KK, VV> MutableMap<KK, VV> aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator) { synchronized (this.lock) { return this.getDelegate().aggregateInPlaceBy(groupBy, zeroValueFactory, mutatingAggregator); } }
@Override public void clear() { synchronized (this.lock) { this.getDelegate().clear(); } }
protected Object readResolve() { return this.map.asSynchronized(); } }
@Override public boolean containsValue(Object value) { synchronized (this.lock) { return this.getDelegate().containsValue(value); } }