Class ObjectLongHashMap<K>
java.lang.Object
org.eclipse.collections.impl.map.mutable.primitive.ObjectLongHashMap<K>
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,MutableObjectLongMap<K>,ObjectLongMap<K>,PrimitiveIterable
This file was automatically generated from template file objectPrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObjectLongHashMap(int initialCapacity) ObjectLongHashMap(ObjectLongMap<? extends K> map) -
Method Summary
Modifier and TypeMethodDescriptionlongaddToValue(K key, long toBeAdded) booleanallSatisfy(LongPredicate predicate) booleanallSatisfyKeyValue(ObjectLongPredicate<K> predicate) booleananySatisfy(LongPredicate 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(LongToObjectFunction<? extends V> function) voidcompact()Deprecated.booleancontains(long value) booleancontainsAll(long... source) booleancontainsAll(LongIterable source) booleancontainsKey(Object key) booleancontainsValue(long value) intcount(LongPredicate predicate) longdetectIfNone(LongPredicate predicate, long ifNone) voideach(LongProcedure procedure) booleanvoidforEachKey(Procedure<? super K> procedure) voidforEachKeyValue(ObjectLongProcedure<? super K> procedure) voidforEachValue(LongProcedure procedure) longlonglonggetIfAbsent(Object key, long ifAbsent) longgetIfAbsentPut(K key, long value) longgetIfAbsentPut(K key, LongFunction0 function) <P> longgetIfAbsentPutWith(K key, LongFunction<? super P> function, P parameter) longgetIfAbsentPutWithKey(K key, LongFunction<? super K> function) longgetOrThrow(Object key) inthashCode()<V> VinjectInto(V injectedValue, ObjectLongToObjectFunction<? super V, ? extends V> function) booleanisEmpty()keySet()keysView()makeString(String separator) makeString(String start, String separator, String end) longmax()longmaxIfEmpty(long defaultValue) doublemedian()longmin()longminIfEmpty(long defaultValue) static <K> ObjectLongHashMap<K>newMap()static <K> ObjectLongHashMap<K>newWithKeysValues(K key1, long value1) static <K> ObjectLongHashMap<K>newWithKeysValues(K key1, long value1, K key2, long value2) static <K> ObjectLongHashMap<K>newWithKeysValues(K key1, long value1, K key2, long value2, K key3, long value3) static <K> ObjectLongHashMap<K>newWithKeysValues(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4) booleannoneSatisfy(LongPredicate predicate) booleannotEmpty()voidvoidputAll(ObjectLongMap<? extends K> map) voidreject(LongPredicate predicate) reject(ObjectLongPredicate<? super K> predicate) voidvoidlongremoveKeyIfAbsent(K key, long value) select(LongPredicate predicate) select(ObjectLongPredicate<? super K> predicate) intsize()longsum()long[]toArray()long[]toArray(long[] target) toBag()toList()toSet()long[]toString()booleanlongupdateValue(K key, long initialValueIfAbsent, LongToLongFunction function) voidupdateValues(ObjectLongToLongFunction<? super K> function) values()withKeysValues(K key1, long value1, K key2, long value2) withKeysValues(K key1, long value1, K key2, long value2, K key3, long value3) withKeysValues(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4) withKeyValue(K key1, long value1) withoutAllKeys(Iterable<? extends K> keys) withoutKey(K key) voidMethods 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectLongMap
putPair, tap, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.map.primitive.ObjectLongMap
injectIntoKeyValue
-
Field Details
-
EMPTY_VALUE
public static final long EMPTY_VALUE- See Also:
-
-
Constructor Details
-
ObjectLongHashMap
public ObjectLongHashMap() -
ObjectLongHashMap
public ObjectLongHashMap(int initialCapacity) -
ObjectLongHashMap
-
-
Method Details
-
newMap
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static <K> ObjectLongHashMap<K> newWithKeysValues(K key1, long value1, K key2, long value2, K key3, long value3) -
newWithKeysValues
public static <K> ObjectLongHashMap<K> newWithKeysValues(K key1, long value1, K key2, long value2, K key3, long value3, K key4, long value4) -
equals
-
hashCode
public int hashCode() -
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
- 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
-
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
- Specified by:
containsAllin interfaceLongIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableObjectLongMap<K>
-
put
- Specified by:
putin interfaceMutableObjectLongMap<K>
-
putAll
- Specified by:
putAllin interfaceMutableObjectLongMap<K>
-
updateValues
- Specified by:
updateValuesin interfaceMutableObjectLongMap<K>
-
removeKey
- Specified by:
removeKeyin interfaceMutableObjectLongMap<K>
-
remove
- Specified by:
removein interfaceMutableObjectLongMap<K>
-
removeKeyIfAbsent
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectLongMap<K>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableObjectLongMap<K>
-
getAndPut
- Specified by:
getAndPutin interfaceMutableObjectLongMap<K>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableObjectLongMap<K>
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectLongMap<K>
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectLongMap<K>
-
updateValue
- Specified by:
updateValuein interfaceMutableObjectLongMap<K>
-
addToValue
- Specified by:
addToValuein interfaceMutableObjectLongMap<K>
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableObjectLongMap<K>
-
withKeysValues
-
withKeysValues
public ObjectLongHashMap<K> withKeysValues(K key1, long value1, K key2, long value2, K key3, long value3) -
withKeysValues
-
withoutKey
- Specified by:
withoutKeyin interfaceMutableObjectLongMap<K>
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableObjectLongMap<K>
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableObjectLongMap<K>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableObjectLongMap<K>
-
toImmutable
- Specified by:
toImmutablein interfaceObjectLongMap<K>
-
get
- Specified by:
getin interfaceObjectLongMap<K>
-
getOrThrow
- Specified by:
getOrThrowin interfaceObjectLongMap<K>
-
getIfAbsent
- Specified by:
getIfAbsentin interfaceObjectLongMap<K>
-
containsKey
- Specified by:
containsKeyin interfaceObjectLongMap<K>
-
containsValue
public boolean containsValue(long value) - Specified by:
containsValuein interfaceObjectLongMap<K>
-
each
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
forEachValue
- Specified by:
forEachValuein interfaceObjectLongMap<K>
-
forEachKey
- Specified by:
forEachKeyin interfaceObjectLongMap<K>
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceObjectLongMap<K>
-
select
- Specified by:
selectin interfaceMutableObjectLongMap<K>- Specified by:
selectin interfaceObjectLongMap<K>
-
reject
- Specified by:
rejectin interfaceMutableObjectLongMap<K>- Specified by:
rejectin interfaceObjectLongMap<K>
-
select
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceMutableObjectLongMap<K>
-
reject
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceMutableObjectLongMap<K>
-
detectIfNone
- Specified by:
detectIfNonein interfaceLongIterable
-
collect
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceMutableObjectLongMap<K>
-
count
- Specified by:
countin interfaceLongIterable
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceObjectLongMap<K>- Since:
- 12.0
-
anySatisfy
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceLongIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V, ? extends V> function) - Specified by:
injectIntoin interfaceLongIterable
-
chunk
- 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
- Specified by:
toListin interfaceLongIterable
-
toSet
- Specified by:
toSetin interfaceLongIterable
-
toBag
- Specified by:
toBagin interfaceLongIterable
-
asLazy
- Specified by:
asLazyin interfaceLongIterable
-
toSortedArray
public long[] toSortedArray()- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
- Specified by:
toSortedListin interfaceLongIterable
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
keysView
- Specified by:
keysViewin interfaceObjectLongMap<K>
-
keyValuesView
- Specified by:
keyValuesViewin interfaceObjectLongMap<K>
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceMutableObjectLongMap<K>- Specified by:
flipUniqueValuesin interfaceObjectLongMap<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 interfaceObjectLongMap<K>
-
values
- Specified by:
valuesin interfaceObjectLongMap<K>
-
trimToSize()instead