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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intEMPTY_VALUE
-
Constructor Summary
Constructors Constructor Description ObjectIntHashMapWithHashingStrategy()Deprecated.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
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectIntMap
putPair, tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectIntMap
injectIntoKeyValue
-
-
-
-
Field Detail
-
EMPTY_VALUE
public static final int EMPTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectIntHashMapWithHashingStrategy
@Deprecated public ObjectIntHashMapWithHashingStrategy()
Deprecated.Use ObjectIntHashMapWithHashingStrategy(HashingStrategy) instead.
-
ObjectIntHashMapWithHashingStrategy
public ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy)
-
ObjectIntHashMapWithHashingStrategy
public ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)
-
ObjectIntHashMapWithHashingStrategy
public ObjectIntHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectIntMap<? extends K> map)
-
-
Method Detail
-
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)
-
toString
public String 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
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
intIterator
public MutableIntIterator 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
public boolean containsAll(IntIterable source)
- Specified by:
containsAllin interfaceIntIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectIntMap<K>
-
put
public void put(K key, int value)
- Specified by:
putin interfaceMutableObjectIntMap<K>
-
putAll
public void putAll(ObjectIntMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectIntMap<K>
-
updateValues
public void updateValues(ObjectIntToIntFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectIntMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectIntMap<K>
-
removeKeyAtIndex
public void removeKeyAtIndex(K key, int index)
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectIntMap<K>
-
removeKeyIfAbsent
public int removeKeyIfAbsent(K key, int value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
public int getIfAbsentPut(K key, int value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectIntMap<K>
-
getAndPut
public int getAndPut(K key, int putValue, int defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
public int getIfAbsentPut(K key, IntFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(K key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(K key, IntFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectIntMap<K>
-
updateValue
public int updateValue(K key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValuein interfaceMutableObjectIntMap<K>
-
addToValue
public int addToValue(K key, int toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectIntMap<K>
-
withKeyValue
public ObjectIntHashMapWithHashingStrategy<K> withKeyValue(K key1, int value1)
- 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
public ObjectIntHashMapWithHashingStrategy<K> withKeysValues(K key1, int value1, K key2, int value2, K key3, int value3, K key4, int value4)
-
withoutKey
public ObjectIntHashMapWithHashingStrategy<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectIntMap<K>
-
withoutAllKeys
public ObjectIntHashMapWithHashingStrategy<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectIntMap<K>
-
asUnmodifiable
public MutableObjectIntMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectIntMap<K>
-
asSynchronized
public MutableObjectIntMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectIntMap<K>
-
toImmutable
public ImmutableObjectIntMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectIntMap<K>
-
get
public int get(Object key)
- Specified by:
getin interfaceObjectIntMap<K>
-
getOrThrow
public int getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectIntMap<K>
-
getIfAbsent
public int getIfAbsent(Object key, int ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectIntMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectIntMap<K>
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValuein interfaceObjectIntMap<K>
-
each
public void each(IntProcedure procedure)
- Specified by:
eachin interfaceIntIterable
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValuein interfaceObjectIntMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectIntMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectIntProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectIntMap<K>
-
select
public ObjectIntHashMapWithHashingStrategy<K> select(ObjectIntPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectIntMap<K>- Specified by:
selectin interfaceObjectIntMap<K>
-
reject
public ObjectIntHashMapWithHashingStrategy<K> reject(ObjectIntPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectIntMap<K>- Specified by:
rejectin interfaceObjectIntMap<K>
-
select
public MutableIntCollection select(IntPredicate predicate)
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceMutableObjectIntMap<K>
-
reject
public MutableIntCollection reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceMutableObjectIntMap<K>
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNonein interfaceIntIterable
-
collect
public <V> MutableCollection<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceMutableObjectIntMap<K>
-
count
public int count(IntPredicate predicate)
- Specified by:
countin interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfyin interfaceIntIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- 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
public MutableIntList toList()
- Specified by:
toListin interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSetin interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBagin interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazyin interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArrayin interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedListin interfaceIntIterable
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectIntMap<K>
-
keyValuesView
public RichIterable<ObjectIntPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectIntMap<K>
-
flipUniqueValues
public MutableIntObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectIntMap<K>- Specified by:
flipUniqueValuesin interfaceObjectIntMap<K>
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void 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
public Set<K> keySet()
- Specified by:
keySetin interfaceObjectIntMap<K>
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceObjectIntMap<K>
-
-