Commit Graph

5 Commits

Author SHA1 Message Date
062d63ca02 add maxCapacity to LongLongHashMap
This allows us to define an upper limit for the memory usage.
2021-04-16 17:52:15 +02:00
9de619d815 accidental linear access times instead of constant
Methods for finding keys in the map would iterate over all keys
when the key did not exist.
Fixed by introducing a new sentinel value (-1) that is used to
mark slots that were previously occupied.
2021-04-04 10:17:30 +02:00
ec7a03f068 LongLongHashMap.get should no longer throw NoSuchElementException
In many use cases it is more efficient to have a getter that returns
a default value instead of throwing an exception. The exception forces
every consumer to call containsKey() before calling get(). In cases
where the consumer wants to use a default value this is unnecessary.
2019-12-22 19:14:41 +01:00
452ef2020d fix LongLongHashMap.forEachOrdered for negative values 2019-09-07 16:51:30 +02:00
86f12e0af6 Add hash map for long to long mappings. 2019-09-07 14:36:51 +02:00