@NotThreadSafe public class UnifiedMapWithHashingStrategy<K,V> extends AbstractMutableMap<K,V> implements Externalizable, BatchIterable<V>
The difference between UnifiedMap and UnifiedMapWithHashingStrategy is that a HashingStrategy based UnifiedMap does not rely on the hashCode or equality of the object at the key, but instead relies on a HashingStrategy implementation provided by a developer to compute the hashCode and equals for the objects stored in the map.
| Constructor and Description |
|---|
UnifiedMapWithHashingStrategy()
Deprecated.
No argument default constructor used for serialization. Instantiating an UnifiedMapWithHashingStrategyMultimap with
this constructor will have a null hashingStrategy and throw NullPointerException when used.
|
UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy) |
UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
int initialCapacity) |
UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
int initialCapacity,
float loadFactor) |
UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
Map<? extends K,? extends V> map) |
UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
org.eclipse.collections.api.tuple.Pair<K,V>... pairs) |
| Modifier and Type | Method and Description |
|---|---|
void |
batchForEach(org.eclipse.collections.api.block.procedure.Procedure<? super V> procedure,
int sectionIndex,
int sectionCount) |
void |
clear() |
UnifiedMapWithHashingStrategy<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) |
<R> org.eclipse.collections.api.map.MutableMap<K,R> |
collectValues(org.eclipse.collections.api.block.function.Function2<? super K,? super V,? extends R> function) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object object) |
void |
forEachKey(org.eclipse.collections.api.block.procedure.Procedure<? super K> procedure) |
void |
forEachKeyValue(org.eclipse.collections.api.block.procedure.Procedure2<? super K,? super V> procedure) |
void |
forEachValue(org.eclipse.collections.api.block.procedure.Procedure<? super V> procedure) |
<P> void |
forEachWith(org.eclipse.collections.api.block.procedure.Procedure2<? super V,? super P> procedure,
P parameter) |
void |
forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super V> objectIntProcedure) |
V |
get(Object key) |
int |
getBatchCount(int batchSize) |
int |
getCollidingBuckets() |
V |
getFirst() |
V |
getIfAbsentPut(K key,
org.eclipse.collections.api.block.function.Function0<? extends V> function) |
V |
getIfAbsentPut(K key,
V value) |
<P> V |
getIfAbsentPutWith(K key,
org.eclipse.collections.api.block.function.Function<? super P,? extends V> function,
P parameter) |
int |
getMapMemoryUsedInWords()
Returns the number of JVM words that is used by this map.
|
int |
hashCode() |
org.eclipse.collections.api.block.HashingStrategy<? super K> |
hashingStrategy() |
boolean |
isEmpty() |
Set<K> |
keySet() |
org.eclipse.collections.api.map.MutableMap<K,V> |
newEmpty() |
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.
|
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
int size) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
int size,
float loadFactor) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
Map<? extends K,? extends V> map) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMap(UnifiedMapWithHashingStrategy<K,V> map) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMapWith(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
Iterable<org.eclipse.collections.api.tuple.Pair<K,V>> inputIterable) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newMapWith(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
org.eclipse.collections.api.tuple.Pair<K,V>... pairs) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
K key,
V value) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
K key1,
V value1,
K key2,
V value2) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
static <K,V> UnifiedMapWithHashingStrategy<K,V> |
newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy,
K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
void |
readExternal(ObjectInput in) |
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.
|
V |
updateValue(K key,
org.eclipse.collections.api.block.function.Function0<? extends V> factory,
org.eclipse.collections.api.block.function.Function<? super V,? extends V> function) |
<P> V |
updateValueWith(K key,
org.eclipse.collections.api.block.function.Function0<? extends V> factory,
org.eclipse.collections.api.block.function.Function2<? super V,? super P,? extends V> function,
P parameter) |
Collection<V> |
values() |
UnifiedMapWithHashingStrategy<K,V> |
withKeysValues(K key,
V value) |
UnifiedMapWithHashingStrategy<K,V> |
withKeysValues(K key1,
V value1,
K key2,
V value2) |
UnifiedMapWithHashingStrategy<K,V> |
withKeysValues(K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
UnifiedMapWithHashingStrategy<K,V> |
withKeysValues(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
void |
writeExternal(ObjectOutput out) |
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, 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, getIfAbsentPutWithKey, groupByUniqueKey, iterator, keysView, keyValuesView, valuesViewallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectWith, detectWithIfNone, each, 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, zipWithIndexforEachaggregateBy, aggregateInPlaceBy, collect, flipUniqueValues, groupByUniqueKeyadd, getIfAbsentPutWithKeycompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAlldetect, 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, 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, iterator, spliterator@Deprecated public UnifiedMapWithHashingStrategy()
public UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy)
public UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, int initialCapacity)
public UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, int initialCapacity, float loadFactor)
public UnifiedMapWithHashingStrategy(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, Map<? extends K,? extends V> map)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, int size)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, int size, float loadFactor)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMap(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, Map<? extends K,? extends V> map)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMapWith(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, Iterable<org.eclipse.collections.api.tuple.Pair<K,V>> inputIterable)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMap(UnifiedMapWithHashingStrategy<K,V> map)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newMapWith(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, org.eclipse.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, K key, V value)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, K key1, V value1, K key2, V value2)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, K key1, V value1, K key2, V value2, K key3, V value3)
public static <K,V> UnifiedMapWithHashingStrategy<K,V> newWithKeysValues(org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy, K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public UnifiedMapWithHashingStrategy<K,V> withKeysValues(K key, V value)
public UnifiedMapWithHashingStrategy<K,V> withKeysValues(K key1, V value1, K key2, V value2)
public UnifiedMapWithHashingStrategy<K,V> withKeysValues(K key1, V value1, K key2, V value2, K key3, V value3)
public UnifiedMapWithHashingStrategy<K,V> withKeysValues(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public org.eclipse.collections.api.block.HashingStrategy<? super K> hashingStrategy()
public UnifiedMapWithHashingStrategy<K,V> clone()
public org.eclipse.collections.api.map.MutableMap<K,V> newEmpty(int capacity)
AbstractMutableMapnewEmpty in class AbstractMutableMap<K,V>public V updateValue(K key, org.eclipse.collections.api.block.function.Function0<? extends V> factory, org.eclipse.collections.api.block.function.Function<? super V,? extends V> function)
updateValue in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>updateValue in class AbstractMutableMapIterable<K,V>public <P> V updateValueWith(K key, org.eclipse.collections.api.block.function.Function0<? extends V> factory, org.eclipse.collections.api.block.function.Function2<? super V,? super P,? extends V> function, P parameter)
updateValueWith in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>updateValueWith in class AbstractMutableMapIterable<K,V>public V getIfAbsentPut(K key, org.eclipse.collections.api.block.function.Function0<? extends V> function)
getIfAbsentPut in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>getIfAbsentPut in class AbstractMutableMapIterable<K,V>public V getIfAbsentPut(K key, V value)
getIfAbsentPut in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>getIfAbsentPut in class AbstractMutableMapIterable<K,V>public <P> V getIfAbsentPutWith(K key, org.eclipse.collections.api.block.function.Function<? super P,? extends V> function, P parameter)
getIfAbsentPutWith in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>getIfAbsentPutWith in class AbstractMutableMapIterable<K,V>public int getCollidingBuckets()
public int getMapMemoryUsedInWords()
public boolean containsKey(Object key)
public boolean containsValue(Object value)
public void forEachKeyValue(org.eclipse.collections.api.block.procedure.Procedure2<? super K,? super V> procedure)
public V getFirst()
getFirst in interface org.eclipse.collections.api.RichIterable<V>getFirst in class AbstractMapIterable<K,V>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 int getBatchCount(int batchSize)
getBatchCount in interface BatchIterable<V>public void batchForEach(org.eclipse.collections.api.block.procedure.Procedure<? super V> procedure, int sectionIndex, int sectionCount)
batchForEach in interface BatchIterable<V>public void forEachKey(org.eclipse.collections.api.block.procedure.Procedure<? super K> procedure)
forEachKey in interface org.eclipse.collections.api.map.MapIterable<K,V>forEachKey in class AbstractMapIterable<K,V>public void forEachValue(org.eclipse.collections.api.block.procedure.Procedure<? super V> procedure)
forEachValue in interface org.eclipse.collections.api.map.MapIterable<K,V>forEachValue in class AbstractMapIterable<K,V>public boolean isEmpty()
public int size()
public boolean equals(Object object)
public int hashCode()
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 void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super V> objectIntProcedure)
forEachWithIndex in interface org.eclipse.collections.api.InternalIterable<V>forEachWithIndex in class AbstractMapIterable<K,V>public <P> void forEachWith(org.eclipse.collections.api.block.procedure.Procedure2<? super V,? super P> procedure, P parameter)
forEachWith in interface org.eclipse.collections.api.InternalIterable<V>forEachWith in class AbstractMapIterable<K,V>public <R> org.eclipse.collections.api.map.MutableMap<K,R> collectValues(org.eclipse.collections.api.block.function.Function2<? super K,? super V,? extends R> function)
collectValues in interface org.eclipse.collections.api.map.MapIterable<K,V>collectValues in interface org.eclipse.collections.api.map.MutableMap<K,V>collectValues in interface org.eclipse.collections.api.map.MutableMapIterable<K,V>collectValues in interface org.eclipse.collections.api.map.UnsortedMapIterable<K,V>collectValues in class AbstractMutableMap<K,V>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–2018. All rights reserved.