A hash map of short to int, implemented using open
addressing with linear probing for collision resolution.

The internal buffers of this implementation (keys, values,
allocated) are always allocated to the nearest size that is a power of two. When
the capacity exceeds the given load factor, the buffer size is doubled.

Important node. The implementation uses power-of-two tables and linear
probing, which may cause poor performance (many collisions) if hash values are
not properly distributed. This implementation uses rehashing
using MurmurHash3.

Author:

This code is inspired by the collaboration and implementation in the fastutil project.

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).

hashCode

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.

equals

public 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
ShortIntMap and both objects contains exactly the same key-value pairs.

iterator

Returns a cursor over the entries (key-value pairs) in this map. The iterator is
implemented as a cursor and it returns the same cursor instance on every
call to Iterator.next(). To read the current key and value use the cursor's
public fields. An example is shown below.

forEach

Applies a given procedure to all keys-value pairs in this container. Returns the argument (any
subclass of ShortIntProcedure. This lets the caller to call methods of the argument
by chaining the call (even if the argument is an anonymous type) to retrieve computed values,
for example.

values

Returns a container view of all values present in this container. The returned collection is a view
over the key set and any modifications (if allowed) introduced to the collection will
propagate to the associative container immediately.