com.carrotsearch.hppc
Interface ByteObjectMap<VType>

All Superinterfaces:
ByteObjectAssociativeContainer<VType>, java.lang.Iterable<ByteObjectCursor<VType>>
All Known Implementing Classes:
ByteObjectOpenHashMap

@Generated(date="2011-07-12T16:58:51+0200",
           value="HPPC generated from: ByteObjectMap.java")
public interface ByteObjectMap<VType>
extends ByteObjectAssociativeContainer<VType>

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.
 VType get(byte key)
           
 int hashCode()
           
 VType put(byte key, VType value)
          Place a given key and value in the container.
 int putAll(ByteObjectAssociativeContainer<? extends VType> 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 ByteObjectCursor<? extends VType>> iterable)
          Puts all keys from an iterable cursor to this map, replacing the values of existing keys, if such keys are present.
 VType remove(byte key)
          Remove all values at the given key.
 
Methods inherited from interface com.carrotsearch.hppc.ByteObjectAssociativeContainer
clear, containsKey, forEach, isEmpty, iterator, keys, removeAll, removeAll, size, values
 

Method Detail

put

VType put(byte key,
          VType 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

VType get(byte 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(ByteObjectAssociativeContainer<? extends VType> 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 ByteObjectCursor<? extends VType>> 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

VType remove(byte 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 ByteObjectMap 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.