Class ConcurrentMutableHashMap<K,V>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<V>
-
- org.eclipse.collections.impl.map.AbstractMapIterable<K,V>
-
- org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable<K,V>
-
- org.eclipse.collections.impl.map.mutable.AbstractMutableMap<K,V>
-
- org.eclipse.collections.impl.map.mutable.ConcurrentMutableHashMap<K,V>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<V>,ConcurrentMap<K,V>,Map<K,V>,InternalIterable<V>,ConcurrentMutableMap<K,V>,MapIterable<K,V>,MutableMap<K,V>,MutableMapIterable<K,V>,UnsortedMapIterable<K,V>,RichIterable<V>
@Deprecated public final class ConcurrentMutableHashMap<K,V> extends AbstractMutableMap<K,V> implements ConcurrentMutableMap<K,V>, Serializable
Deprecated.since 2.0A simple concurrent implementation of MutableMap which uses java.util.concurrent.ConcurrentHashMap for its underlying concurrent Map implementation.- See Also:
ConcurrentHashMap, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConcurrentMutableHashMap(ConcurrentMap<K,V> delegate)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.MutableMap<K,V>clone()Deprecated.<E> MutableMap<K,V>collectKeysAndValues(Iterable<E> iterable, Function<? super E,? extends K> keyFunction, Function<? super E,? extends V> valueFunction)Deprecated.booleancontainsKey(Object key)Deprecated.booleancontainsValue(Object value)Deprecated.Set<Map.Entry<K,V>>entrySet()Deprecated.booleanequals(Object o)Deprecated.voidforEachKey(Procedure<? super K> procedure)Deprecated.voidforEachKeyValue(Procedure2<? super K,? super V> procedure)Deprecated.voidforEachValue(Procedure<? super V> procedure)Deprecated.<P> voidforEachWith(Procedure2<? super V,? super P> procedure, P parameter)Deprecated.voidforEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)Deprecated.Vget(Object key)Deprecated.VgetIfAbsent(K key, Function0<? extends V> function)Deprecated.VgetIfAbsentPut(K key, Function<? super K,? extends V> factory)Deprecated.VgetIfAbsentPut(K key, Function0<? extends V> function)Deprecated.VgetIfAbsentPut(K key, V value)Deprecated.<P> VgetIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)Deprecated.VgetIfAbsentValue(K key, V value)Deprecated.<P> VgetIfAbsentWith(K key, Function<? super P,? extends V> function, P parameter)Deprecated.inthashCode()Deprecated.<A> AifPresentApply(K key, Function<? super V,? extends A> function)Deprecated.booleanisEmpty()Deprecated.Iterator<V>iterator()Deprecated.Set<K>keySet()Deprecated.MutableMap<K,V>newEmpty()Deprecated.<K,V>
MutableMap<K,V>newEmpty(int capacity)Deprecated.Creates a new instance of the same type, using the given capacity and the default growth parameters.static <NK,NV>
ConcurrentMutableHashMap<NK,NV>newMap()Deprecated.static <NK,NV>
ConcurrentMutableHashMap<NK,NV>newMap(int initialCapacity)Deprecated.static <NK,NV>
ConcurrentMutableHashMap<NK,NV>newMap(int initialCapacity, float loadFactor, int concurrencyLevel)Deprecated.static <NK,NV>
ConcurrentMutableHashMap<NK,NV>newMap(Map<NK,NV> map)Deprecated.booleannotEmpty()Deprecated.Vput(K key, V value)Deprecated.voidputAll(Map<? extends K,? extends V> map)Deprecated.VputIfAbsent(K key, V value)Deprecated.Vremove(Object key)Deprecated.booleanremove(Object key, Object value)Deprecated.VremoveKey(K key)Deprecated.Vreplace(K key, V value)Deprecated.booleanreplace(K key, V oldValue, V newValue)Deprecated.intsize()Deprecated.ConcurrentMutableMap<K,V>tap(Procedure<? super V> procedure)Deprecated.ImmutableMap<K,V>toImmutable()Deprecated.StringtoString()Deprecated.Returns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.VupdateValue(K key, Function0<? extends V> factory, Function<? super V,? extends V> function)Deprecated.<P> VupdateValueWith(K key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)Deprecated.Collection<V>values()Deprecated.ConcurrentMutableHashMap<K,V>withAllKeyValueArguments(Pair<? extends K,? extends V>... keyValues)Deprecated.ConcurrentMutableHashMap<K,V>withAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)Deprecated.ConcurrentMutableHashMap<K,V>withKeyValue(K key, V value)Deprecated.ConcurrentMutableHashMap<K,V>withoutAllKeys(Iterable<? extends K> keys)Deprecated.ConcurrentMutableHashMap<K,V>withoutKey(K key)Deprecated.-
Methods inherited from class org.eclipse.collections.impl.map.mutable.AbstractMutableMap
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectValues, collectWith, flatCollect, flip, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable
aggregateBy, collect, countBy, countByEach, countByWith, detect, detectOptional, flipUniqueValues, getIfAbsentPutWithKey, keysView, keyValuesView, sumByDouble, sumByFloat, sumByInt, sumByLong, valuesView
-
Methods inherited from class org.eclipse.collections.impl.map.AbstractMapIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, getFirst, getLast, getOnly, getOrDefault, noneSatisfy, noneSatisfyWith, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
-
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, merge, replaceAll
-
Methods inherited from interface org.eclipse.collections.api.map.ConcurrentMutableMap
forEach, getOrDefault, withMap, withMapIterable
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface org.eclipse.collections.api.map.MapIterable
detect, detectOptional, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, valuesView
-
Methods inherited from interface org.eclipse.collections.api.map.MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectValues, collectWith, flatCollect, flatCollectWith, flip, flipUniqueValues, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, zip, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, countBy, countByEach, countByWith, getIfAbsentPutWithKey, putAllMapIterable, putPair, removeAllKeys, removeIf, sumByDouble, sumByFloat, sumByInt, sumByLong
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
-
-
-
-
Constructor Detail
-
ConcurrentMutableHashMap
public ConcurrentMutableHashMap(ConcurrentMap<K,V> delegate)
Deprecated.
-
-
Method Detail
-
newMap
public static <NK,NV> ConcurrentMutableHashMap<NK,NV> newMap()
Deprecated.
-
newMap
public static <NK,NV> ConcurrentMutableHashMap<NK,NV> newMap(int initialCapacity)
Deprecated.
-
newMap
public static <NK,NV> ConcurrentMutableHashMap<NK,NV> newMap(int initialCapacity, float loadFactor, int concurrencyLevel)
Deprecated.
-
newMap
public static <NK,NV> ConcurrentMutableHashMap<NK,NV> newMap(Map<NK,NV> map)
Deprecated.
-
withKeyValue
public ConcurrentMutableHashMap<K,V> withKeyValue(K key, V value)
Deprecated.- Specified by:
withKeyValuein interfaceMutableMap<K,V>- Specified by:
withKeyValuein interfaceMutableMapIterable<K,V>- Overrides:
withKeyValuein classAbstractMutableMap<K,V>
-
withAllKeyValues
public ConcurrentMutableHashMap<K,V> withAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)
Deprecated.- Specified by:
withAllKeyValuesin interfaceMutableMap<K,V>- Specified by:
withAllKeyValuesin interfaceMutableMapIterable<K,V>- Overrides:
withAllKeyValuesin classAbstractMutableMap<K,V>
-
withAllKeyValueArguments
public ConcurrentMutableHashMap<K,V> withAllKeyValueArguments(Pair<? extends K,? extends V>... keyValues)
Deprecated.- Specified by:
withAllKeyValueArgumentsin interfaceMutableMap<K,V>- Specified by:
withAllKeyValueArgumentsin interfaceMutableMapIterable<K,V>- Overrides:
withAllKeyValueArgumentsin classAbstractMutableMap<K,V>
-
withoutKey
public ConcurrentMutableHashMap<K,V> withoutKey(K key)
Deprecated.- Specified by:
withoutKeyin interfaceMutableMap<K,V>- Specified by:
withoutKeyin interfaceMutableMapIterable<K,V>- Overrides:
withoutKeyin classAbstractMutableMap<K,V>
-
withoutAllKeys
public ConcurrentMutableHashMap<K,V> withoutAllKeys(Iterable<? extends K> keys)
Deprecated.- Specified by:
withoutAllKeysin interfaceMutableMap<K,V>- Specified by:
withoutAllKeysin interfaceMutableMapIterable<K,V>- Overrides:
withoutAllKeysin classAbstractMutableMap<K,V>
-
toString
public String toString()
Deprecated.Description copied from class:AbstractRichIterableReturns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.Assert.assertEquals("[]", Lists.mutable.empty().toString()); Assert.assertEquals("[1]", Lists.mutable.with(1).toString()); Assert.assertEquals("[1, 2, 3]", Lists.mutable.with(1, 2, 3).toString());- Specified by:
toStringin interfaceMapIterable<K,V>- Specified by:
toStringin interfaceRichIterable<K>- Overrides:
toStringin classAbstractRichIterable<V>- Returns:
- a string representation of this collection.
- See Also:
AbstractCollection.toString()
-
clone
public MutableMap<K,V> clone()
Deprecated.- Specified by:
clonein interfaceMutableMap<K,V>- Specified by:
clonein classAbstractMutableMap<K,V>
-
newEmpty
public <K,V> MutableMap<K,V> newEmpty(int capacity)
Deprecated.Description copied from class:AbstractMutableMapCreates a new instance of the same type, using the given capacity and the default growth parameters.- Specified by:
newEmptyin classAbstractMutableMap<K,V>
-
notEmpty
public boolean notEmpty()
Deprecated.- Specified by:
notEmptyin interfaceRichIterable<K>
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
Deprecated.- Specified by:
forEachWithIndexin interfaceInternalIterable<K>- Overrides:
forEachWithIndexin classAbstractMapIterable<K,V>
-
size
public int size()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.- Specified by:
isEmptyin interfaceMap<K,V>- Specified by:
isEmptyin interfaceRichIterable<K>- Overrides:
isEmptyin classAbstractRichIterable<V>
-
newEmpty
public MutableMap<K,V> newEmpty()
Deprecated.- Specified by:
newEmptyin interfaceMutableMap<K,V>- Specified by:
newEmptyin interfaceMutableMapIterable<K,V>
-
tap
public ConcurrentMutableMap<K,V> tap(Procedure<? super V> procedure)
Deprecated.- Specified by:
tapin interfaceConcurrentMutableMap<K,V>- Specified by:
tapin interfaceMapIterable<K,V>- Specified by:
tapin interfaceMutableMap<K,V>- Specified by:
tapin interfaceMutableMapIterable<K,V>- Specified by:
tapin interfaceRichIterable<K>- Specified by:
tapin interfaceUnsortedMapIterable<K,V>- Overrides:
tapin classAbstractMutableMap<K,V>
-
forEachValue
public void forEachValue(Procedure<? super V> procedure)
Deprecated.- Specified by:
forEachValuein interfaceMapIterable<K,V>- Overrides:
forEachValuein classAbstractMapIterable<K,V>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
Deprecated.- Specified by:
forEachKeyin interfaceMapIterable<K,V>- Overrides:
forEachKeyin classAbstractMapIterable<K,V>
-
forEachKeyValue
public void forEachKeyValue(Procedure2<? super K,? super V> procedure)
Deprecated.- Specified by:
forEachKeyValuein interfaceMapIterable<K,V>
-
collectKeysAndValues
public <E> MutableMap<K,V> collectKeysAndValues(Iterable<E> iterable, Function<? super E,? extends K> keyFunction, Function<? super E,? extends V> valueFunction)
Deprecated.- Specified by:
collectKeysAndValuesin interfaceMutableMap<K,V>
-
removeKey
public V removeKey(K key)
Deprecated.- Specified by:
removeKeyin interfaceMutableMapIterable<K,V>
-
containsKey
public boolean containsKey(Object key)
Deprecated.- Specified by:
containsKeyin interfaceMap<K,V>- Specified by:
containsKeyin interfaceMapIterable<K,V>
-
containsValue
public boolean containsValue(Object value)
Deprecated.- Specified by:
containsValuein interfaceMap<K,V>- Specified by:
containsValuein interfaceMapIterable<K,V>
-
getIfAbsentPut
public V getIfAbsentPut(K key, Function0<? extends V> function)
Deprecated.- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>- Overrides:
getIfAbsentPutin classAbstractMutableMapIterable<K,V>
-
getIfAbsentPut
public V getIfAbsentPut(K key, V value)
Deprecated.- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>- Overrides:
getIfAbsentPutin classAbstractMutableMapIterable<K,V>
-
getIfAbsentPutWith
public <P> V getIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)
Deprecated.- Specified by:
getIfAbsentPutWithin interfaceMutableMapIterable<K,V>- Overrides:
getIfAbsentPutWithin classAbstractMutableMapIterable<K,V>
-
getIfAbsent
public V getIfAbsent(K key, Function0<? extends V> function)
Deprecated.- Specified by:
getIfAbsentin interfaceMapIterable<K,V>- Overrides:
getIfAbsentin classAbstractMapIterable<K,V>
-
getIfAbsentValue
public V getIfAbsentValue(K key, V value)
Deprecated.- Specified by:
getIfAbsentValuein interfaceMapIterable<K,V>- Overrides:
getIfAbsentValuein classAbstractMapIterable<K,V>
-
getIfAbsentWith
public <P> V getIfAbsentWith(K key, Function<? super P,? extends V> function, P parameter)
Deprecated.- Specified by:
getIfAbsentWithin interfaceMapIterable<K,V>- Overrides:
getIfAbsentWithin classAbstractMapIterable<K,V>
-
getIfAbsentPut
public V getIfAbsentPut(K key, Function<? super K,? extends V> factory)
Deprecated.
-
ifPresentApply
public <A> A ifPresentApply(K key, Function<? super V,? extends A> function)
Deprecated.- Specified by:
ifPresentApplyin interfaceMapIterable<K,V>- Overrides:
ifPresentApplyin classAbstractMapIterable<K,V>
-
equals
public boolean equals(Object o)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
forEachWith
public <P> void forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
Deprecated.- Specified by:
forEachWithin interfaceInternalIterable<K>- Overrides:
forEachWithin classAbstractMapIterable<K,V>
-
putIfAbsent
public V putIfAbsent(K key, V value)
Deprecated.- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V>- Specified by:
putIfAbsentin interfaceMap<K,V>
-
updateValue
public V updateValue(K key, Function0<? extends V> factory, Function<? super V,? extends V> function)
Deprecated.- Specified by:
updateValuein interfaceMutableMapIterable<K,V>- Overrides:
updateValuein classAbstractMutableMapIterable<K,V>
-
updateValueWith
public <P> V updateValueWith(K key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)
Deprecated.- Specified by:
updateValueWithin interfaceMutableMapIterable<K,V>- Overrides:
updateValueWithin classAbstractMutableMapIterable<K,V>
-
toImmutable
public ImmutableMap<K,V> toImmutable()
Deprecated.- Specified by:
toImmutablein interfaceMapIterable<K,V>- Specified by:
toImmutablein interfaceMutableMapIterable<K,V>- Specified by:
toImmutablein interfaceUnsortedMapIterable<K,V>- Overrides:
toImmutablein classAbstractMutableMap<K,V>
-
-