public class MapAdapter<K,V> extends AbstractMutableMap<K,V> implements Serializable
To create a new wrapper around an existing Map instance, use the adapt(Map) factory method.
| Modifier and Type | Method and Description |
|---|---|
static <K,V> org.eclipse.collections.api.map.MutableMap<K,V> |
adapt(Map<K,V> map) |
void |
clear() |
org.eclipse.collections.api.map.MutableMap<K,V> |
clone() |
<E> org.eclipse.collections.api.map.MutableMap<K,V> |
collectKeysAndValues(Iterable<E> iterable,
org.eclipse.collections.api.block.function.Function<? super E,? extends K> keyFunction,
org.eclipse.collections.api.block.function.Function<? super E,? extends V> valueFunction) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
void |
forEachKeyValue(org.eclipse.collections.api.block.procedure.Procedure2<? super K,? super V> procedure) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
Set<K> |
keySet() |
org.eclipse.collections.api.map.MutableMap<K,V> |
newEmpty() |
<K,V> org.eclipse.collections.api.map.MutableMap<K,V> |
newEmpty(int capacity)
Creates a new instance of the same type, using the given capacity and the default growth parameters.
|
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
V |
remove(Object key) |
V |
removeKey(K key) |
int |
size() |
org.eclipse.collections.api.map.ImmutableMap<K,V> |
toImmutable() |
String |
toString()
Returns a string representation of this collection.
|
Collection<V> |
values() |
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectValues, collectWith, flatCollect, flip, groupBy, groupByEach, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, tap, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withoutAllKeys, withoutKey, zip, zipWithIndexadd, aggregateBy, aggregateInPlaceBy, collect, detect, flipUniqueValues, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, groupByUniqueKey, keysView, keyValuesView, updateValue, updateValueWith, valuesViewallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectWith, detectWithIfNone, each, forEachKey, forEachValue, forEachWith, forEachWithIndex, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, ifPresentApply, noneSatisfy, noneSatisfyWith, toArray, toArrayappendString, appendString, appendString, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, notEmpty, reject, rejectWith, select, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndexaggregateBy, aggregateInPlaceBy, collect, flipUniqueValues, groupByUniqueKeyadd, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, updateValue, updateValueWithcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAlldetect, forEachKey, forEachValue, getIfAbsent, getIfAbsentValue, getIfAbsentWith, ifPresentApply, keysView, keyValuesView, valuesViewallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, each, flatCollect, getFirst, getLast, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndexforEach, forEachWith, forEachWithIndexforEach, spliteratorpublic static <K,V> org.eclipse.collections.api.map.MutableMap<K,V> adapt(Map<K,V> map)
public String toString()
AbstractRichIterable
This implementation creates an empty string buffer, appends a left square bracket, and iterates over the collection appending the string representation of each element in turn. After appending each element except the last, the string ", " is appended. Finally a right bracket is appended. A string is obtained from the string buffer, and returned.
public <K,V> org.eclipse.collections.api.map.MutableMap<K,V> newEmpty(int capacity)
AbstractMutableMapnewEmpty in class AbstractMutableMap<K,V>public int size()
public boolean isEmpty()
public void forEachKeyValue(org.eclipse.collections.api.block.procedure.Procedure2<? super K,? super V> procedure)
public <E> org.eclipse.collections.api.map.MutableMap<K,V> collectKeysAndValues(Iterable<E> iterable, org.eclipse.collections.api.block.function.Function<? super E,? extends K> keyFunction, org.eclipse.collections.api.block.function.Function<? super E,? extends V> valueFunction)
public boolean containsKey(Object key)
public boolean containsValue(Object value)
public boolean equals(Object o)
public int hashCode()
public org.eclipse.collections.api.map.ImmutableMap<K,V> toImmutable()
toImmutable in interface org.eclipse.collections.api.map.MapIterable<K,V>toImmutable in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>toImmutable in interface org.eclipse.collections.api.map.UnsortedMapIterable<K,V>toImmutable in class AbstractMutableMap<K,V>Copyright © 2004–2017. All rights reserved.