org.sunflow.util

Class FastHashMap<K,V>

Implemented Interfaces:
Iterable

public class FastHashMap<K,V>
extends java.lang.Object
implements Iterable

Fast hash map implementation which uses array storage along with quadratic probing to resolve collisions. The capacity is doubled when the load goes beyond 50% and is halved when the load drops below 20%.

Nested Class Summary

static class
FastHashMap.Entry

Constructor Summary

FastHashMap()

Method Summary

Iterator
V>> iterator()
void
clear()
boolean
containsKey(K k)
V
get(K k)
V
put(K k, V v)
void
remove(K k)

Constructor Details

FastHashMap

public FastHashMap()

Method Details

V>> iterator

public Iterator> iterator()

clear

public void clear()

containsKey

public boolean containsKey(K k)

get

public V get(K k)

put

public V put(K k,
             V v)

remove

public void remove(K k)