Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.map.mutable.primitive

public Class DoubleLongHashMap

extends AbstractMutableLongValuesMap
implements MutableDoubleLongMap, Externalizable, MutableDoubleKeysMap
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.impl.map.mutable.primitive.MutableDoubleKeysMap, org.eclipse.collections.impl.map.primitive.DoubleKeysMap, java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.map.primitive.MutableDoubleLongMap, org.eclipse.collections.api.map.primitive.MutableLongValuesMap, org.eclipse.collections.api.map.primitive.LongValuesMap, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.map.primitive.DoubleLongMap
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Iterator, .NoSuchElementException, org.eclipse.collections.api.DoubleIterable, .LazyDoubleIterable, .LongIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.DoubleToLongFunction, .LongFunction, .LongFunction0, .LongToLongFunction, .DoubleLongToLongFunction, .ObjectLongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.DoubleLongPredicate, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.DoubleProcedure, .DoubleLongProcedure, .ObjectIntProcedure, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.factory.primitive.DoubleLongMaps, .LongDoubleMaps, org.eclipse.collections.api.iterator.DoubleIterator, .MutableDoubleIterator, .MutableLongIterator, org.eclipse.collections.api.map.primitive.DoubleLongMap, .ImmutableDoubleLongMap, .MutableDoubleLongMap, .MutableLongDoubleMap, org.eclipse.collections.api.set.primitive.DoubleSet, .LongSet, .MutableDoubleSet, org.eclipse.collections.api.tuple.primitive.DoubleLongPair, org.eclipse.collections.impl.bag.mutable.primitive.LongHashBag, org.eclipse.collections.impl.iterator.UnmodifiableDoubleIterator, org.eclipse.collections.impl.lazy.AbstractLazyIterable, org.eclipse.collections.impl.lazy.primitive.AbstractLazyDoubleIterable, org.eclipse.collections.impl.set.mutable.primitive.DoubleHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples

This file was automatically generated from template file primitivePrimitiveHashMap.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class
private class
private class
private class

Field Summary

Modifier and TypeField and Description
private static final int
private boolean
private static final int
private static final double
private static final long
private static final int
private static final int
private double[]
private int
private int
private static final double
private AbstractMutableLongValuesMap.SentinelValues
private static final long
private long[]

Constructor Summary

AccessConstructor and Description
public
public
DoubleLongHashMap(int initialCapacity)

public

Method Summary

Modifier and TypeMethod and Description
private void
addKeyValueAtIndex(double key, long value, int index)

public long
addToValue(double key, long toBeAdded)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.addToValue.

Increments and updates the value associated with the key, if a value exists, or sets the value to be the specified value if one does not.

protected void
allocateTable(int sizeToAllocate)

public boolean
public MutableDoubleLongMap
asSynchronized()

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.asSynchronized.

Returns a synchronized view of this map, delegating all operations to this map but ensuring only one caller has access to the map at a time.

public MutableDoubleLongMap
asUnmodifiable()

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.asUnmodifiable.

Returns an unmodifiable view of this map, delegating all read-only operations to this map and throwing an UnsupportedOperationException for all mutating operations.

public void
public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

public boolean
private void
public boolean
private long
fastGetIfAbsent(double key, long ifAbsent)

public MutableLongDoubleMap
flipUniqueValues()

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.flipUniqueValues.

Return the LongDoubleMap that is obtained by flipping the direction of this map and making the associations from value to key.

public void
public void
forEachKeyValue(DoubleLongProcedure procedure)

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.forEachKeyValue.

Iterates through each key/value pair in the map, invoking the procedure for each.

public long
get(double key)

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.get.

Retrieves the value associated with the key.

public long
getAndPut(double key, long putValue, long defaultValue)

Overrides default org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.getAndPut.

Retrieves the value associated with the key if one exists; associates a putValue with the key.

protected long
private long
getForSentinel(double key, long ifAbsent)

public long
getIfAbsent(double key, long ifAbsent)

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.getIfAbsent.

Retrieves the value associated with the key, returning the specified default value if no such mapping exists.

public long
getIfAbsentPut(double key, long value)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, associates a value with the key.

public long
getIfAbsentPut(double key, LongFunction0 function)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, invokes the supplier and associates the result with the key.

public <P> long
getIfAbsentPutWith(double key, LongFunction<? super P> function, P parameter)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.getIfAbsentPutWith.

Retrieves the value associated with the key if one exists; if it does not, invokes the value function with the parameter and associates the result with the key.

public long
getIfAbsentPutWithKey(double key, DoubleToLongFunction function)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.getIfAbsentPutWithKey.

Retrieves the value associated with the key if one exists; if it does not, associates the result of invoking the value function with the key.

protected int
public long
getOrThrow(double key)

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.getOrThrow.

Retrieves the value associated with the key, throwing an IllegalStateException if no such mapping exists.

protected AbstractMutableLongValuesMap.SentinelValues
protected int
protected long
public int
public <V> V
injectInto(V injectedValue, ObjectLongToObjectFunction<? super V, ? extends V> function)

Implements org.eclipse.collections.api.LongIterable.injectInto.

private static boolean
isEmptyKey(double key)

private static boolean
isNonSentinel(double key)

protected boolean
private static boolean
isRemovedKey(double key)

public MutableDoubleSet
keySet()

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.keySet.

Returns a set containing all the keys in this map.

public LazyDoubleIterable
keysView()

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.keysView.

Returns a view of the keys in this map.

public RichIterable<DoubleLongPair>
keyValuesView()

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.keyValuesView.

Returns a view of the key/value pairs in this map.

public MutableLongIterator
longIterator()

Implements org.eclipse.collections.api.LongIterable.longIterator, org.eclipse.collections.api.map.primitive.MutableLongValuesMap.longIterator.

Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.

private int
mask(int spread)

private int
public static DoubleLongHashMap
newWithKeysValues(double key1, long value1)

public static DoubleLongHashMap
newWithKeysValues(double key1, long value1, double key2, long value2)

public static DoubleLongHashMap
newWithKeysValues(double key1, long value1, double key2, long value2, double key3, long value3)

public static DoubleLongHashMap
newWithKeysValues(double key1, long value1, double key2, long value2, double key3, long value3, double key4, long value4)

pack-priv int
probe(double element)

pack-priv int
probeThree(double element, int removedIndex)

pack-priv int
probeTwo(double element, int removedIndex)

public void
put(double key, long value)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.put.

Associates a value with the specified key.

public void
putAll(DoubleLongMap map)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.putAll.

Puts all of the key/value mappings from the specified map into this map.

private void
putForEmptySentinel(long value)

private void
public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public DoubleLongHashMap
reject(DoubleLongPredicate predicate)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.reject.

Return a copy of this map containing only the key/value pairs that do not match the predicate.

public void
remove(double key)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.remove.

Removes the mapping associated with the key, if one exists, from the map.

public void
private void
removeKeyAtIndex(int index)

public long
removeKeyIfAbsent(double key, long value)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.removeKeyIfAbsent.

Removes the mapping associated with the key, if one exists, from the map, returning the previously associated value with the key.

public DoubleLongHashMap
select(DoubleLongPredicate predicate)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.select.

Return a copy of this map containing only the key/value pairs that match the predicate.

protected void
private long
slowGetIfAbsent(double key, long ifAbsent)

private long
slowGetIfAbsentTwo(double key, long ifAbsent)

private int
pack-priv int
spreadAndMask(double element)

pack-priv int
spreadTwoAndMask(double element)

public ImmutableDoubleLongMap
toImmutable()

Implements org.eclipse.collections.api.map.primitive.DoubleLongMap.toImmutable.

Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.

public String
public boolean
public long
updateValue(double key, long initialValueIfAbsent, LongToLongFunction function)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.updateValue.

Updates or sets the value associated with the key by applying the function to the existing value, if one exists, or to the specified initial value if one does not.

public void
public MutableLongCollection
values()

Implements org.eclipse.collections.api.map.primitive.LongValuesMap.values.

Returns the values in this map as a separate collection.

public DoubleLongHashMap
withKeysValues(double key1, long value1, double key2, long value2)

public DoubleLongHashMap
withKeysValues(double key1, long value1, double key2, long value2, double key3, long value3)

public DoubleLongHashMap
withKeysValues(double key1, long value1, double key2, long value2, double key3, long value3, double key4, long value4)

public DoubleLongHashMap
withKeyValue(double key1, long value1)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.withKeyValue.

Associates a value with the specified key.

public DoubleLongHashMap
withoutAllKeys(DoubleIterable keys)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.withoutAllKeys.

Removes the mappings associated with all the keys, if they exist, from this map.

public DoubleLongHashMap
withoutKey(double key)

Implements org.eclipse.collections.api.map.primitive.MutableDoubleLongMap.withoutKey.

Removes the mapping associated with the key, if one exists, from this map.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap:
addEmptyKeyValueaddRemovedKeyValueallSatisfyanySatisfyappendStringchunkcollectcontainscontainsAllcontainsValuecountdetectIfNoneeachforEachValueisEmptymaxminnotEmptyrejectremoveEmptyKeyremoveRemovedKeyselectsizesumtoArraytoArray