Class ObjectLongHashMapWithHashingStrategy<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.ObjectLongHashMapWithHashingStrategy<K>
-
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,MutableObjectLongMap<K>,ObjectLongMap<K>,PrimitiveIterable
public class ObjectLongHashMapWithHashingStrategy<K> extends Object implements MutableObjectLongMap<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 longEMPTY_VALUE
-
Constructor Summary
Constructors Constructor Description ObjectLongHashMapWithHashingStrategy()Deprecated.Use ObjectLongHashMapWithHashingStrategy(HashingStrategy) instead.ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy)ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectLongMap<? extends K> map)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.MutableObjectLongMap
putPair, tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectLongMap
injectIntoKeyValue
-
-
-
-
Field Detail
-
EMPTY_VALUE
public static final long EMPTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectLongHashMapWithHashingStrategy
@Deprecated public ObjectLongHashMapWithHashingStrategy()
Deprecated.Use ObjectLongHashMapWithHashingStrategy(HashingStrategy) instead.
-
ObjectLongHashMapWithHashingStrategy
public ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy)
-
ObjectLongHashMapWithHashingStrategy
public ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)
-
ObjectLongHashMapWithHashingStrategy
public ObjectLongHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectLongMap<? extends K> map)
-
-
Method Detail
-
newMap
public static <K> ObjectLongHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy)
-
newMap
public static <K> ObjectLongHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy, ObjectLongMap<K> map)
-
newMap
public static <K> ObjectLongHashMapWithHashingStrategy<K> newMap(ObjectLongHashMapWithHashingStrategy<K> map)
-
newMapWithInitialCapacity
public static <K> ObjectLongHashMapWithHashingStrategy<K> newMapWithInitialCapacity(HashingStrategy<? super K> hashingStrategy, int initialCapacity)
-
newWithKeysValues
public static <K> ObjectLongHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, long value1)
-
newWithKeysValues
public static <K> ObjectLongHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, long value1, K key2, long value2)
-
newWithKeysValues
public static <K> ObjectLongHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, long value1, K key2, long value2, K key3, long value3)
-
newWithKeysValues
public static <K> ObjectLongHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4)
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectLongMap<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
-
longIterator
public MutableLongIterator longIterator()
- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableObjectLongMap<K>
-
toArray
public long[] toArray()
- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
containsin interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAllin interfaceLongIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectLongMap<K>
-
put
public void put(K key, long value)
- Specified by:
putin interfaceMutableObjectLongMap<K>
-
putAll
public void putAll(ObjectLongMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectLongMap<K>
-
updateValues
public void updateValues(ObjectLongToLongFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectLongMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectLongMap<K>
-
removeKeyAtIndex
public void removeKeyAtIndex(K key, int index)
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectLongMap<K>
-
removeKeyIfAbsent
public long removeKeyIfAbsent(K key, long value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectLongMap<K>
-
getIfAbsentPut
public long getIfAbsentPut(K key, long value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectLongMap<K>
-
getAndPut
public long getAndPut(K key, long putValue, long defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectLongMap<K>
-
getIfAbsentPut
public long getIfAbsentPut(K key, LongFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectLongMap<K>
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(K key, LongFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectLongMap<K>
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(K key, LongFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectLongMap<K>
-
updateValue
public long updateValue(K key, long initialValueIfAbsent, LongToLongFunction function)
- Specified by:
updateValuein interfaceMutableObjectLongMap<K>
-
addToValue
public long addToValue(K key, long toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectLongMap<K>
-
withKeyValue
public ObjectLongHashMapWithHashingStrategy<K> withKeyValue(K key1, long value1)
- Specified by:
withKeyValuein interfaceMutableObjectLongMap<K>
-
withKeysValues
public ObjectLongHashMapWithHashingStrategy<K> withKeysValues(K key1, long value1, K key2, long value2)
-
withKeysValues
public ObjectLongHashMapWithHashingStrategy<K> withKeysValues(K key1, long value1, K key2, long value2, K key3, long value3)
-
withKeysValues
public ObjectLongHashMapWithHashingStrategy<K> withKeysValues(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4)
-
withoutKey
public ObjectLongHashMapWithHashingStrategy<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectLongMap<K>
-
withoutAllKeys
public ObjectLongHashMapWithHashingStrategy<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectLongMap<K>
-
asUnmodifiable
public MutableObjectLongMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectLongMap<K>
-
asSynchronized
public MutableObjectLongMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectLongMap<K>
-
toImmutable
public ImmutableObjectLongMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectLongMap<K>
-
get
public long get(Object key)
- Specified by:
getin interfaceObjectLongMap<K>
-
getOrThrow
public long getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectLongMap<K>
-
getIfAbsent
public long getIfAbsent(Object key, long ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectLongMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectLongMap<K>
-
containsValue
public boolean containsValue(long value)
- Specified by:
containsValuein interfaceObjectLongMap<K>
-
each
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable
-
forEachValue
public void forEachValue(LongProcedure procedure)
- Specified by:
forEachValuein interfaceObjectLongMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectLongMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectLongProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectLongMap<K>
-
allSatisfyKeyValue
public boolean allSatisfyKeyValue(ObjectLongPredicate<K> predicate)
- Specified by:
allSatisfyKeyValuein interfaceObjectLongMap<K>- Since:
- 12.0
-
select
public ObjectLongHashMapWithHashingStrategy<K> select(ObjectLongPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectLongMap<K>- Specified by:
selectin interfaceObjectLongMap<K>
-
reject
public ObjectLongHashMapWithHashingStrategy<K> reject(ObjectLongPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectLongMap<K>- Specified by:
rejectin interfaceObjectLongMap<K>
-
select
public MutableLongCollection select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceMutableObjectLongMap<K>
-
reject
public MutableLongCollection reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceMutableObjectLongMap<K>
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
collect
public <V> MutableCollection<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceMutableObjectLongMap<K>
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfyin interfaceLongIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
sum
public long sum()
- Specified by:
sumin interfaceLongIterable
-
max
public long max()
- Specified by:
maxin interfaceLongIterable
-
min
public long min()
- Specified by:
minin interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmptyin interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmptyin interfaceLongIterable
-
average
public double average()
- Specified by:
averagein interfaceLongIterable
-
median
public double median()
- Specified by:
medianin interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toListin interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSetin interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBagin interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazyin interfaceLongIterable
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
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 interfaceObjectLongMap<K>
-
keyValuesView
public RichIterable<ObjectLongPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectLongMap<K>
-
flipUniqueValues
public MutableLongObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectLongMap<K>- Specified by:
flipUniqueValuesin interfaceObjectLongMap<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 interfaceObjectLongMap<K>
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceObjectLongMap<K>
-
-