Open addressing based implementation of a hashmap (not supporting the Map interface though) for message headers. The keys are shorts (IDs) and the values Headers, and they're stored in 2 arrays: an ID array and a headers array. The indices of the IDs array corespond with the headers array, e.g.
IDs: id-1 | id-2 | id-3 | ... | id-n | Headers: hdr-1 | hdr-2 | hdr-3 | ... | hdr-n |
The arrays are populated from left to right, and any 0 slots in 'ids' can terminate an interation, or signal empty slots.
It is assumed that we only have a few headers, 3-4 on average. Note that getting a header for a given key and putting a new key/header are operations with O(n) cost, so this implementation is
not recommended for a large number of elements.
This class is not synchronized
@author Bela Ban