Class ObjectIntHashMapWithHashingStrategy<K>
java.lang.Object
org.eclipse.collections.impl.map.mutable.primitive.ObjectIntHashMapWithHashingStrategy<K>
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,MutableObjectIntMap<K>,ObjectIntMap<K>,PrimitiveIterable
public class ObjectIntHashMapWithHashingStrategy<K>
extends Object
implements MutableObjectIntMap<K>, Externalizable
This file was automatically generated from template file objectPrimitiveHashMapWithHashingStrategy.stg.
- Since:
- 7.0.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Use ObjectIntHashMapWithHashingStrategy(HashingStrategy) instead.ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy) ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity) ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectIntMap<? extends K> map) -
Method Summary
Modifier and TypeMethodDescriptionintaddToValue(K key, int toBeAdded) booleanallSatisfy(IntPredicate predicate) booleanallSatisfyKeyValue(ObjectIntPredicate<K> predicate) booleananySatisfy(IntPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()chunk(int size) voidclear()<V> MutableCollection<V>collect(IntToObjectFunction<? extends V> function) voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontains(int value) booleancontainsAll(int... source) booleancontainsAll(IntIterable source) booleancontainsKey(Object key) booleancontainsValue(int value) intcount(IntPredicate predicate) intdetectIfNone(IntPredicate predicate, int ifNone) voideach(IntProcedure procedure) booleanvoidforEachKey(Procedure<? super K> procedure) voidforEachKeyValue(ObjectIntProcedure<? super K> procedure) voidforEachValue(IntProcedure procedure) intintintgetIfAbsent(Object key, int ifAbsent) intgetIfAbsentPut(K key, int value) intgetIfAbsentPut(K key, IntFunction0 function) <P> intgetIfAbsentPutWith(K key, IntFunction<? super P> function, P parameter) intgetIfAbsentPutWithKey(K key, IntFunction<? super K> function) intgetOrThrow(Object key) inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V, ? extends V> function) booleanisEmpty()keySet()keysView()makeString(String separator) makeString(String start, String separator, String end) intmax()intmaxIfEmpty(int defaultValue) doublemedian()intmin()intminIfEmpty(int defaultValue) static <K> ObjectIntHashMapWithHashingStrategy<K>newMap(HashingStrategy<? super K> hashingStrategy) static <K> ObjectIntHashMapWithHashingStrategy<K>newMap(HashingStrategy<? super K> hashingStrategy, ObjectIntMap<K> map) static <K> ObjectIntHashMapWithHashingStrategy<K>static <K> ObjectIntHashMapWithHashingStrategy<K>newMapWithInitialCapacity(HashingStrategy<? super K> hashingStrategy, int initialCapacity) static <K> ObjectIntHashMapWithHashingStrategy<K>newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1) static <K> ObjectIntHashMapWithHashingStrategy<K>newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2) static <K> ObjectIntHashMapWithHashingStrategy<K>newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2, K key3, int value3) static <K> ObjectIntHashMapWithHashingStrategy<K>newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4) booleannoneSatisfy(IntPredicate predicate) booleannotEmpty()voidvoidputAll(ObjectIntMap<? extends K> map) voidreject(IntPredicate predicate) reject(ObjectIntPredicate<? super K> predicate) voidvoidvoidremoveKeyAtIndex(K key, int index) intremoveKeyIfAbsent(K key, int value) select(IntPredicate predicate) select(ObjectIntPredicate<? super K> predicate) intsize()longsum()int[]toArray()int[]toArray(int[] target) toBag()toList()toSet()int[]toString()booleanintupdateValue(K key, int initialValueIfAbsent, IntToIntFunction function) voidupdateValues(ObjectIntToIntFunction<? super K> function) values()withKeysValues(K key1, int value1, K key2, int value2) withKeysValues(K key1, int value1, K key2, int value2, K key3, int value3) withKeysValues(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4) withKeyValue(K key1, int value1) withoutAllKeys(Iterable<? extends K> keys) withoutKey(K key) voidMethods inherited from interface org.eclipse.collections.api.IntIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectIntMap
putPair, tap, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.map.primitive.ObjectIntMap
injectIntoKeyValue
-
Field Details
-
EMPTY_VALUE
public static final int EMPTY_VALUE- See Also:
-
-
Constructor Details
-
ObjectIntHashMapWithHashingStrategy
Deprecated.Use ObjectIntHashMapWithHashingStrategy(HashingStrategy) instead. -
ObjectIntHashMapWithHashingStrategy
-
ObjectIntHashMapWithHashingStrategy
public ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity) -
ObjectIntHashMapWithHashingStrategy
public ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectIntMap<? extends K> map)
-
-
Method Details
-
newMap
public static <K> ObjectIntHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy) -
newMap
public static <K> ObjectIntHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy, ObjectIntMap<K> map) -
newMap
public static <K> ObjectIntHashMapWithHashingStrategy<K> newMap(ObjectIntHashMapWithHashingStrategy<K> map) -
newMapWithInitialCapacity
public static <K> ObjectIntHashMapWithHashingStrategy<K> newMapWithInitialCapacity(HashingStrategy<? super K> hashingStrategy, int initialCapacity) -
newWithKeysValues
public static <K> ObjectIntHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1) -
newWithKeysValues
public static <K> ObjectIntHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2) -
newWithKeysValues
public static <K> ObjectIntHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2, K key3, int value3) -
newWithKeysValues
public static <K> ObjectIntHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4) -
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toStringin interfaceObjectIntMap<K>- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableObjectIntMap<K>
-
toArray
public int[] toArray()- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target) - Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int value) - Specified by:
containsin interfaceIntIterable
-
containsAll
public boolean containsAll(int... source) - Specified by:
containsAllin interfaceIntIterable
-
containsAll
- Specified by:
containsAllin interfaceIntIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableObjectIntMap<K>
-
put
- Specified by:
putin interfaceMutableObjectIntMap<K>
-
putAll
- Specified by:
putAllin interfaceMutableObjectIntMap<K>
-
updateValues
- Specified by:
updateValuesin interfaceMutableObjectIntMap<K>
-
removeKey
- Specified by:
removeKeyin interfaceMutableObjectIntMap<K>
-
removeKeyAtIndex
-
remove
- Specified by:
removein interfaceMutableObjectIntMap<K>
-
removeKeyIfAbsent
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableObjectIntMap<K>
-
getAndPut
- Specified by:
getAndPutin interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectIntMap<K>
-
updateValue
- Specified by:
updateValuein interfaceMutableObjectIntMap<K>
-
addToValue
- Specified by:
addToValuein interfaceMutableObjectIntMap<K>
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableObjectIntMap<K>
-
withKeysValues
public ObjectIntHashMapWithHashingStrategy<K> withKeysValues(K key1, int value1, K key2, int value2) -
withKeysValues
public ObjectIntHashMapWithHashingStrategy<K> withKeysValues(K key1, int value1, K key2, int value2, K key3, int value3) -
withKeysValues
-
withoutKey
- Specified by:
withoutKeyin interfaceMutableObjectIntMap<K>
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableObjectIntMap<K>
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableObjectIntMap<K>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableObjectIntMap<K>
-
toImmutable
- Specified by:
toImmutablein interfaceObjectIntMap<K>
-
get
- Specified by:
getin interfaceObjectIntMap<K>
-
getOrThrow
- Specified by:
getOrThrowin interfaceObjectIntMap<K>
-
getIfAbsent
- Specified by:
getIfAbsentin interfaceObjectIntMap<K>
-
containsKey
- Specified by:
containsKeyin interfaceObjectIntMap<K>
-
containsValue
public boolean containsValue(int value) - Specified by:
containsValuein interfaceObjectIntMap<K>
-
each
- Specified by:
eachin interfaceIntIterable
-
forEachValue
- Specified by:
forEachValuein interfaceObjectIntMap<K>
-
forEachKey
- Specified by:
forEachKeyin interfaceObjectIntMap<K>
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceObjectIntMap<K>
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceObjectIntMap<K>- Since:
- 12.0
-
select
- Specified by:
selectin interfaceMutableObjectIntMap<K>- Specified by:
selectin interfaceObjectIntMap<K>
-
reject
- Specified by:
rejectin interfaceMutableObjectIntMap<K>- Specified by:
rejectin interfaceObjectIntMap<K>
-
select
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceMutableObjectIntMap<K>
-
reject
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceMutableObjectIntMap<K>
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
collect
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceMutableObjectIntMap<K>
-
count
- Specified by:
countin interfaceIntIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceIntIterable
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
chunk
- Specified by:
chunkin interfaceIntIterable
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue) - Specified by:
maxIfEmptyin interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue) - Specified by:
minIfEmptyin interfaceIntIterable
-
average
public double average()- Specified by:
averagein interfaceIntIterable
-
median
public double median()- Specified by:
medianin interfaceIntIterable
-
toList
- Specified by:
toListin interfaceIntIterable
-
toSet
- Specified by:
toSetin interfaceIntIterable
-
toBag
- Specified by:
toBagin interfaceIntIterable
-
asLazy
- Specified by:
asLazyin interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()- Specified by:
toSortedArrayin interfaceIntIterable
-
toSortedList
- Specified by:
toSortedListin interfaceIntIterable
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
keysView
- Specified by:
keysViewin interfaceObjectIntMap<K>
-
keyValuesView
- Specified by:
keyValuesViewin interfaceObjectIntMap<K>
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceMutableObjectIntMap<K>- Specified by:
flipUniqueValuesin interfaceObjectIntMap<K>
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels. -
keySet
- Specified by:
keySetin interfaceObjectIntMap<K>
-
values
- Specified by:
valuesin interfaceObjectIntMap<K>
-