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.0
A simple concurrent implementation of MutableMap which uses java.util.concurrent.ConcurrentHashMap for its underlying
concurrent Map implementation.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMutableMap
AbstractMutableMap.ValuesCollectionCommon<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentMap<K, V> Deprecated.private static final longDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDeprecated.ConcurrentMutableHashMap(ConcurrentMap<K, V> delegate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()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.Adds all the entries derived fromiterabletothis.booleancontainsKey(Object key) Deprecated.booleancontainsValue(Object value) Deprecated.entrySet()Deprecated.booleanDeprecated.Follows the same general contract asMap.equals(Object).voidforEachKey(Procedure<? super K> procedure) Deprecated.Calls theprocedurewith each key of the map.voidforEachKeyValue(Procedure2<? super K, ? super V> procedure) Deprecated.Calls theprocedurewith each key-value pair of the map.voidforEachValue(Procedure<? super V> procedure) Deprecated.Calls the procedure with each value of the map.<P> voidforEachWith(Procedure2<? super V, ? super P> procedure, P parameter) Deprecated.The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.voidforEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure) Deprecated.Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.Deprecated.getIfAbsent(K key, Function0<? extends V> function) Deprecated.Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified Function0.getIfAbsentPut(K key, Function<? super K, ? extends V> factory) Deprecated.getIfAbsentPut(K key, Function0<? extends V> function) Deprecated.Get and return the value in the Map at the specified key.getIfAbsentPut(K key, V value) Deprecated.Get and return the value in the Map at the specified key.<P> VgetIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter) Deprecated.Get and return the value in the Map at the specified key.getIfAbsentValue(K key, V value) Deprecated.Return the value in the Map that corresponds to the specified key, or if there is no value at the key, returnvalue.<P> VgetIfAbsentWith(K key, Function<? super P, ? extends V> function, P parameter) Deprecated.Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified function and parameter.inthashCode()Deprecated.Follows the same general contract asMap.hashCode().<A> AifPresentApply(K key, Function<? super V, ? extends A> function) Deprecated.If there is a value in the Map that corresponds to the specified key return the result of applying the specified Function on the value, otherwise return null.booleanisEmpty()Deprecated.Returns true if this iterable has zero items.iterator()Deprecated.keySet()Deprecated.Deprecated.A concurrent implementation ofConcurrentMap.merge(Object, Object, BiFunction)andMap.merge(Object, Object, BiFunction).MutableMap<K, V> newEmpty()Deprecated.Creates a new instance of the same type, using the default capacity and growth parameters.<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> Deprecated.booleannotEmpty()Deprecated.The English equivalent of !this.isEmpty()Deprecated.voidDeprecated.putIfAbsent(K key, V value) Deprecated.Deprecated.booleanDeprecated.Deprecated.Remove an entry from the map at the specifiedkey.Deprecated.booleanDeprecated.intsize()Deprecated.Returns the number of items in this iterable.Deprecated.Executes the Procedure for each element in the iterable and returnsthis.Deprecated.Returns an immutable copy of this map.toString()Deprecated.Returns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.Deprecated.Looks up the value associated withkey, applies thefunctionto it, and replaces the value.<P> VupdateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter) Deprecated.Same asMutableMapIterable.updateValue(Object, Function0, Function)with a Function2 and specified parameter which is passed to the function.values()Deprecated.withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValues) Deprecated.Convenience var-args version of withAllKeyValueswithAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) Deprecated.This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements.withKeyValue(K key, V value) Deprecated.This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements.withoutAllKeys(Iterable<? extends K> keys) Deprecated.This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements.withoutKey(K key) Deprecated.This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements.Methods inherited from class AbstractMutableMap
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysUnique, collectLong, collectShort, collectValues, collectWith, flatCollect, flip, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, reject, rejectWith, replaceAll, select, select, selectInstancesOf, selectWith, zip, zipWithIndexMethods inherited from class AbstractMutableMapIterable
aggregateBy, collect, countBy, countByEach, countByWith, detect, detectOptional, flipUniqueValues, getIfAbsentPutWithKey, keysView, keyValuesView, reduceBy, sumByDouble, sumByFloat, sumByInt, sumByLong, valuesViewMethods inherited from class AbstractMapIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, getFirst, getLast, getOnly, getOrDefault, isAbsent, keyAndValueEquals, keyAndValueHashCode, noneSatisfy, noneSatisfyWith, toArray, toArrayMethods inherited from class 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, zipWithIndexMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, replaceAllMethods inherited from interface ConcurrentMutableMap
forEach, getOrDefault, withMap, withMapIterableMethods inherited from interface InternalIterable
forEachMethods inherited from interface MapIterable
detect, detectOptional, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, valuesViewMethods inherited from interface MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysUnique, collectLong, collectShort, collectValues, collectWith, flatCollect, flatCollectWith, flip, flipUniqueValues, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reduceBy, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, zip, zipWithIndexMethods inherited from interface MutableMapIterable
add, countBy, countByEach, countByWith, getIfAbsentPutWithKey, putAllMapIterable, putPair, removeAllKeys, removeIf, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface 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, reduceBy, 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
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDDeprecated.- See Also:
-
delegate
Deprecated.
-
-
Constructor Details
-
ConcurrentMutableHashMap
private ConcurrentMutableHashMap()Deprecated. -
ConcurrentMutableHashMap
Deprecated.
-
-
Method Details
-
newMap
Deprecated. -
newMap
Deprecated. -
newMap
public static <NK,NV> ConcurrentMutableHashMap<NK,NV> newMap(int initialCapacity, float loadFactor, int concurrencyLevel) Deprecated. -
newMap
Deprecated. -
withKeyValue
Deprecated.Description copied from interface:MutableMapIterableThis method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements. In order to support fixed size maps, a new instance of a map would have to be returned including the keys and values of the original plus the additional key and value. In the case of mutable maps, the original map is modified and then returned. In order to use this method properly with mutable and fixed size maps the following approach must be taken:map = map.withKeyValue("new key", "new value");In the case of FixedSizeMap, a new instance will be returned by withKeyValue, and any variables that previously referenced the original map will need to be redirected to reference the new instance. In the case of a FastMap or UnifiedMap, you will be replacing the reference to map with map, since FastMap and UnifiedMap will both return "this" after calling put on themselves.- Specified by:
withKeyValuein interfaceMutableMap<K,V> - Specified by:
withKeyValuein interfaceMutableMapIterable<K,V> - Overrides:
withKeyValuein classAbstractMutableMap<K,V> - See Also:
-
withAllKeyValues
public ConcurrentMutableHashMap<K,V> withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) Deprecated.Description copied from interface:MutableMapIterableThis method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements. In order to support fixed size maps, a new instance of a map would have to be returned including the keys and values of the original plus all the additional keys and values. In the case of mutable maps, the original map is modified and then returned. In order to use this method properly with mutable and fixed size maps the following approach must be taken:map = map.withAllKeyValues(FastList.newListWith(PairImpl.of("new key", "new value")));In the case of FixedSizeMap, a new instance will be returned by withAllKeyValues, and any variables that previously referenced the original map will need to be redirected to reference the new instance. In the case of a FastMap or UnifiedMap, you will be replacing the reference to map with map, since FastMap and UnifiedMap will both return "this" after calling put on themselves.- Specified by:
withAllKeyValuesin interfaceMutableMap<K,V> - Specified by:
withAllKeyValuesin interfaceMutableMapIterable<K,V> - Overrides:
withAllKeyValuesin classAbstractMutableMap<K,V> - See Also:
-
withAllKeyValueArguments
public ConcurrentMutableHashMap<K,V> withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValues) Deprecated.Description copied from interface:MutableMapIterableConvenience var-args version of withAllKeyValues- Specified by:
withAllKeyValueArgumentsin interfaceMutableMap<K,V> - Specified by:
withAllKeyValueArgumentsin interfaceMutableMapIterable<K,V> - Overrides:
withAllKeyValueArgumentsin classAbstractMutableMap<K,V> - See Also:
-
withoutKey
Deprecated.Description copied from interface:MutableMapIterableThis method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements. In order to support fixed size maps, a new instance of a map would have to be returned including the keys and values of the original minus the key and value to be removed. In the case of mutable maps, the original map is modified and then returned. In order to use this method properly with mutable and fixed size maps the following approach must be taken:map = map.withoutKey("key");In the case of FixedSizeMap, a new instance will be returned by withoutKey, and any variables that previously referenced the original map will need to be redirected to reference the new instance. In the case of a FastMap or UnifiedMap, you will be replacing the reference to map with map, since FastMap and UnifiedMap will both return "this" after calling remove on themselves.- Specified by:
withoutKeyin interfaceMutableMap<K,V> - Specified by:
withoutKeyin interfaceMutableMapIterable<K,V> - Overrides:
withoutKeyin classAbstractMutableMap<K,V> - See Also:
-
withoutAllKeys
Deprecated.Description copied from interface:MutableMapIterableThis method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements. In order to support fixed size maps, a new instance of a map would have to be returned including the keys and values of the original minus all the keys and values to be removed. In the case of mutable maps, the original map is modified and then returned. In order to use this method properly with mutable and fixed size maps the following approach must be taken:map = map.withoutAllKeys(FastList.newListWith("key1", "key2"));In the case of FixedSizeMap, a new instance will be returned by withoutAllKeys, and any variables that previously referenced the original map will need to be redirected to reference the new instance. In the case of a FastMap or UnifiedMap, you will be replacing the reference to map with map, since FastMap and UnifiedMap will both return "this" after calling remove on themselves.- Specified by:
withoutAllKeysin interfaceMutableMap<K,V> - Specified by:
withoutAllKeysin interfaceMutableMapIterable<K,V> - Overrides:
withoutAllKeysin classAbstractMutableMap<K,V> - See Also:
-
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:
-
clone
Deprecated.- Specified by:
clonein interfaceMutableMap<K,V> - Specified by:
clonein classAbstractMutableMap<K,V>
-
newEmpty
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.Description copied from interface:RichIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfaceRichIterable<K>
-
forEachWithIndex
Deprecated.Description copied from interface:InternalIterableIterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });- Specified by:
forEachWithIndexin interfaceInternalIterable<K>- Overrides:
forEachWithIndexin classAbstractMapIterable<K,V>
-
size
public int size()Deprecated.Description copied from interface:RichIterableReturns the number of items in this iterable. -
isEmpty
public boolean isEmpty()Deprecated.Description copied from interface:RichIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfaceMap<K,V> - Specified by:
isEmptyin interfaceRichIterable<K>- Overrides:
isEmptyin classAbstractRichIterable<V>
-
iterator
-
remove
-
keySet
-
values
-
entrySet
-
clear
-
newEmpty
Deprecated.Description copied from interface:MutableMapIterableCreates a new instance of the same type, using the default capacity and growth parameters.- Specified by:
newEmptyin interfaceMutableMap<K,V> - Specified by:
newEmptyin interfaceMutableMapIterable<K,V>
-
tap
Deprecated.Description copied from interface:RichIterableExecutes the Procedure for each element in the iterable and returnsthis.Example using a Java 8 lambda expression:
RichIterable<Person> tapped = people.tap(person -> LOGGER.info(person.getName()));- 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> - See Also:
-
forEachValue
Deprecated.Description copied from interface:MapIterableCalls the procedure with each value of the map.Set<String> result = UnifiedSet.newSet(); MutableMap<Integer, String> map = this.newMapWithKeysValues(1, "One", 2, "Two", 3, "Three", 4, "Four"); map.forEachValue(new CollectionAddProcedure<String>(result)); Verify.assertSetsEqual(UnifiedSet.newSetWith("One", "Two", "Three", "Four"), result);- Specified by:
forEachValuein interfaceMapIterable<K,V> - Overrides:
forEachValuein classAbstractMapIterable<K,V>
-
forEachKey
Deprecated.Description copied from interface:MapIterableCalls theprocedurewith each key of the map.final Collection<Integer> result = new ArrayList<Integer>(); MutableMap<Integer, String> map = this.newMapWithKeysValues(1, "1", 2, "2", 3, "3"); map.forEachKey(new CollectionAddProcedure<Integer>(result)); Verify.assertContainsAll(result, 1, 2, 3);- Specified by:
forEachKeyin interfaceMapIterable<K,V> - Overrides:
forEachKeyin classAbstractMapIterable<K,V>
-
forEachKeyValue
Deprecated.Description copied from interface:MapIterableCalls theprocedurewith each key-value pair of the map.final Collection<String> collection = new ArrayList<String>(); MutableMap<Integer, String> map = this.newMapWithKeysValues(1, "One", 2, "Two", 3, "Three"); map.forEachKeyValue((Integer key, String value) -> collection.add(String.valueOf(key) + value)); Verify.assertContainsAll(collection, "1One", "2Two", "3Three");- Specified by:
forEachKeyValuein interfaceMapIterable<K,V>
-
get
-
put
-
putAll
-
collectKeysAndValues
public <E> MutableMap<K,V> collectKeysAndValues(Iterable<E> iterable, Function<? super E, ? extends K> keyFunction, Function<? super E, ? extends V> valueFunction) Deprecated.Description copied from interface:MutableMapAdds all the entries derived fromiterabletothis. The key and value for each entry is determined by applying thekeyFunctionandvalueFunctionto each item incollection. Any entry inmapthat has the same key as an entry inthiswill have its value replaced by that inmap.- Specified by:
collectKeysAndValuesin interfaceMutableMap<K,V>
-
removeKey
Deprecated.Description copied from interface:MutableMapIterableRemove an entry from the map at the specifiedkey.- Specified by:
removeKeyin interfaceMutableMapIterable<K,V> - Returns:
- The value removed from entry at key, or null if not found.
- See Also:
-
containsKey
Deprecated.- Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceMapIterable<K,V> - See Also:
-
containsValue
Deprecated.- Specified by:
containsValuein interfaceMap<K,V> - Specified by:
containsValuein interfaceMapIterable<K,V> - See Also:
-
getIfAbsentPut
Deprecated.Description copied from interface:MutableMapIterableGet and return the value in the Map at the specified key. Alternatively, if there is no value in the map at the key, return the result of evaluating the specified Function0, and put that value in the map at the specified key.- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V> - Overrides:
getIfAbsentPutin classAbstractMutableMapIterable<K,V>
-
getIfAbsentPut
Deprecated.Description copied from interface:MutableMapIterableGet and return the value in the Map at the specified key. Alternatively, if there is no value in the map at the key, return the specified value, and put that value in the map at the specified key.- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V> - Overrides:
getIfAbsentPutin classAbstractMutableMapIterable<K,V>
-
getIfAbsentPutWith
Deprecated.Description copied from interface:MutableMapIterableGet and return the value in the Map at the specified key. Alternatively, if there is no value in the map for that key return the result of evaluating the specified Function using the specified parameter, and put that value in the map at the specified key.- Specified by:
getIfAbsentPutWithin interfaceMutableMapIterable<K,V> - Overrides:
getIfAbsentPutWithin classAbstractMutableMapIterable<K,V>
-
getIfAbsent
Deprecated.Description copied from interface:MapIterableReturn the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified Function0.- Specified by:
getIfAbsentin interfaceMapIterable<K,V> - Overrides:
getIfAbsentin classAbstractMapIterable<K,V>
-
getIfAbsentValue
Deprecated.Description copied from interface:MapIterableReturn the value in the Map that corresponds to the specified key, or if there is no value at the key, returnvalue.- Specified by:
getIfAbsentValuein interfaceMapIterable<K,V> - Overrides:
getIfAbsentValuein classAbstractMapIterable<K,V>
-
getIfAbsentWith
Deprecated.Description copied from interface:MapIterableReturn the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified function and parameter.- Specified by:
getIfAbsentWithin interfaceMapIterable<K,V> - Overrides:
getIfAbsentWithin classAbstractMapIterable<K,V>
-
getIfAbsentPut
-
ifPresentApply
Deprecated.Description copied from interface:MapIterableIf there is a value in the Map that corresponds to the specified key return the result of applying the specified Function on the value, otherwise return null.- Specified by:
ifPresentApplyin interfaceMapIterable<K,V> - Overrides:
ifPresentApplyin classAbstractMapIterable<K,V>
-
equals
Deprecated.Description copied from interface:MapIterableFollows the same general contract asMap.equals(Object). -
hashCode
public int hashCode()Deprecated.Description copied from interface:MapIterableFollows the same general contract asMap.hashCode(). -
forEachWith
Deprecated.Description copied from interface:InternalIterableThe procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) -> { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } }, fred);Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);- Specified by:
forEachWithin interfaceInternalIterable<K>- Overrides:
forEachWithin classAbstractMapIterable<K,V>
-
putIfAbsent
Deprecated.- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
updateValue
public V updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function) Deprecated.Description copied from interface:MutableMapIterableLooks up the value associated withkey, applies thefunctionto it, and replaces the value. If there is no value associated withkey, starts it off with a value supplied byfactory.- 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.Description copied from interface:MutableMapIterableSame asMutableMapIterable.updateValue(Object, Function0, Function)with a Function2 and specified parameter which is passed to the function.- Specified by:
updateValueWithin interfaceMutableMapIterable<K,V> - Overrides:
updateValueWithin classAbstractMutableMapIterable<K,V>
-
merge
Deprecated.Description copied from interface:ConcurrentMutableMapA concurrent implementation ofConcurrentMap.merge(Object, Object, BiFunction)andMap.merge(Object, Object, BiFunction). In the implementing classes, it is possible for theremappingFunctionto be called multiple times. It is also possible for theremappingFunctionto be called one or more times, but the result is not used (because the old entry was concurrently removed). -
toImmutable
Deprecated.Description copied from interface:MutableMapIterableReturns an immutable copy of this map. If the map is immutable, it returns itself.- Specified by:
toImmutablein interfaceMapIterable<K,V> - Specified by:
toImmutablein interfaceMutableMapIterable<K,V> - Specified by:
toImmutablein interfaceUnsortedMapIterable<K,V> - Overrides:
toImmutablein classAbstractMutableMap<K,V>
-