com.carrotsearch.hppc
Interface DoubleLongMap

All Superinterfaces:
DoubleLongAssociativeContainer, java.lang.Iterable<DoubleLongCursor>
All Known Implementing Classes:
DoubleLongOpenHashMap

@Generated(date="2011-07-12T16:58:51+0200",
           value="HPPC generated from: DoubleLongMap.java")
public interface DoubleLongMap
extends DoubleLongAssociativeContainer

An associative container with unique binding from keys to a single value.


Method Summary
 boolean equals(java.lang.Object obj)
          Compares the specified object with this set for equality.
 long get(double key)
           
 int hashCode()
           
 long put(double key, long value)
          Place a given key and value in the container.
 int putAll(DoubleLongAssociativeContainer container)
          Puts all keys from another container to this map, replacing the values of existing keys, if such keys are present.
 int putAll(java.lang.Iterable<? extends DoubleLongCursor> iterable)
          Puts all keys from an iterable cursor to this map, replacing the values of existing keys, if such keys are present.
 long remove(double key)
          Remove all values at the given key.
 
Methods inherited from interface com.carrotsearch.hppc.DoubleLongAssociativeContainer
clear, containsKey, forEach, isEmpty, iterator, keys, removeAll, removeAll, size, values
 

Method Detail

put

long put(double key,
         long value)
Place a given key and value in the container.

Returns:
The value previously stored under the given key in the map is returned.

get

long get(double key)
Returns:
Returns the value associated with the given key or the default value for the key type, if the key is not associated with any value. Important note: For primitive type values, the value returned for a non-existing key may not be the default value of the primitive type (it may be any value previously assigned to that slot).

putAll

int putAll(DoubleLongAssociativeContainer container)
Puts all keys from another container to this map, replacing the values of existing keys, if such keys are present.

Returns:
Returns the number of keys added to the map as a result of this call (not previously present in the map). Values of existing keys are overwritten.

putAll

int putAll(java.lang.Iterable<? extends DoubleLongCursor> iterable)
Puts all keys from an iterable cursor to this map, replacing the values of existing keys, if such keys are present.

Returns:
Returns the number of keys added to the map as a result of this call (not previously present in the map). Values of existing keys are overwritten.

remove

long remove(double key)
Remove all values at the given key. The default value for the key type is returned if the value does not exist in the map.


equals

boolean equals(java.lang.Object obj)
Compares the specified object with this set for equality. Returns true if and only if the specified object is also a DoubleLongMap and both objects contains exactly the same key-value pairs.

Overrides:
equals in class java.lang.Object

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code of elements stored in the map. The hash code is defined as a sum of hash codes of keys and values stored within the set). Because sum is commutative, this ensures that different order of elements in a set does not affect the hash code.


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.