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 int
EMPTY_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:
toString
in interfaceObjectIntMap<K>
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableObjectIntMap<K>
-
toArray
public int[] toArray()
- Specified by:
toArray
in interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArray
in interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
contains
in interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAll
in interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAll
in interfaceIntIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableObjectIntMap<K>
-
put
public void put(K key, int value)
- Specified by:
put
in interfaceMutableObjectIntMap<K>
-
putAll
public void putAll(ObjectIntMap<? extends K> map)
- Specified by:
putAll
in interfaceMutableObjectIntMap<K>
-
updateValues
public void updateValues(ObjectIntToIntFunction<? super K> function)
- Specified by:
updateValues
in interfaceMutableObjectIntMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKey
in interfaceMutableObjectIntMap<K>
-
removeKeyAtIndex
public void removeKeyAtIndex(K key, int index)
-
remove
public void remove(Object key)
- Specified by:
remove
in interfaceMutableObjectIntMap<K>
-
removeKeyIfAbsent
public int removeKeyIfAbsent(K key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
public int getIfAbsentPut(K key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectIntMap<K>
-
getAndPut
public int getAndPut(K key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableObjectIntMap<K>
-
getIfAbsentPut
public int getIfAbsentPut(K key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(K key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableObjectIntMap<K>
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(K key, IntFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableObjectIntMap<K>
-
updateValue
public int updateValue(K key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableObjectIntMap<K>
-
addToValue
public int addToValue(K key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableObjectIntMap<K>
-
withKeyValue
public ObjectIntHashMapWithHashingStrategy<K> withKeyValue(K key1, int value1)
- Specified by:
withKeyValue
in 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:
withoutKey
in interfaceMutableObjectIntMap<K>
-
withoutAllKeys
public ObjectIntHashMapWithHashingStrategy<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeys
in interfaceMutableObjectIntMap<K>
-
asUnmodifiable
public MutableObjectIntMap<K> asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableObjectIntMap<K>
-
asSynchronized
public MutableObjectIntMap<K> asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableObjectIntMap<K>
-
toImmutable
public ImmutableObjectIntMap<K> toImmutable()
- Specified by:
toImmutable
in interfaceObjectIntMap<K>
-
get
public int get(Object key)
- Specified by:
get
in interfaceObjectIntMap<K>
-
getOrThrow
public int getOrThrow(Object key)
- Specified by:
getOrThrow
in interfaceObjectIntMap<K>
-
getIfAbsent
public int getIfAbsent(Object key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceObjectIntMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceObjectIntMap<K>
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValue
in interfaceObjectIntMap<K>
-
each
public void each(IntProcedure procedure)
- Specified by:
each
in interfaceIntIterable
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValue
in interfaceObjectIntMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKey
in interfaceObjectIntMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectIntProcedure<? super K> procedure)
- Specified by:
forEachKeyValue
in interfaceObjectIntMap<K>
-
select
public ObjectIntHashMapWithHashingStrategy<K> select(ObjectIntPredicate<? super K> predicate)
- Specified by:
select
in interfaceMutableObjectIntMap<K>
- Specified by:
select
in interfaceObjectIntMap<K>
-
reject
public ObjectIntHashMapWithHashingStrategy<K> reject(ObjectIntPredicate<? super K> predicate)
- Specified by:
reject
in interfaceMutableObjectIntMap<K>
- Specified by:
reject
in interfaceObjectIntMap<K>
-
select
public MutableIntCollection select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceMutableObjectIntMap<K>
-
reject
public MutableIntCollection reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceMutableObjectIntMap<K>
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNone
in interfaceIntIterable
-
collect
public <V> MutableCollection<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceMutableObjectIntMap<K>
-
count
public int count(IntPredicate predicate)
- Specified by:
count
in interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfy
in interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfy
in interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfy
in interfaceIntIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunk
in interfaceIntIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceIntIterable
-
max
public int max()
- Specified by:
max
in interfaceIntIterable
-
min
public int min()
- Specified by:
min
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmpty
in interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmpty
in interfaceIntIterable
-
average
public double average()
- Specified by:
average
in interfaceIntIterable
-
median
public double median()
- Specified by:
median
in interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toList
in interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSet
in interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBag
in interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArray
in interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedList
in interfaceIntIterable
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysView
in interfaceObjectIntMap<K>
-
keyValuesView
public RichIterable<ObjectIntPair<K>> keyValuesView()
- Specified by:
keyValuesView
in interfaceObjectIntMap<K>
-
flipUniqueValues
public MutableIntObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableObjectIntMap<K>
- Specified by:
flipUniqueValues
in 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:
keySet
in interfaceObjectIntMap<K>
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceObjectIntMap<K>
-
-