Package com.googlecode.aviator.utils
Class ArrayHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- com.googlecode.aviator.utils.ArrayHashMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<K,V>
public class ArrayHashMap<K,V> extends java.util.AbstractMap<K,V> implements java.util.Map<K,V>, java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ArrayHashMap.MapEntry<K,V>
-
Field Summary
Fields Modifier and Type Field Description private ArrayHashMap.MapEntry<K,V>[]
entries
private static float
LOAD_FACTOR
private int
loadThreshold
private static long
serialVersionUID
private int
size
-
Constructor Summary
Constructors Constructor Description ArrayHashMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
(package private) static int
hash(java.lang.Object key)
V
put(K key, V value)
V
remove(java.lang.Object key)
private ArrayHashMap.MapEntry<K,V>[]
resize(ArrayHashMap.MapEntry<K,V>[] table)
private void
resizeIfLoadHigh(ArrayHashMap.MapEntry<K,V>[] table)
private void
setEntries(ArrayHashMap.MapEntry[] entries)
int
size()
-
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
-
-
-
-
Field Detail
-
LOAD_FACTOR
private static final float LOAD_FACTOR
- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
entries
private ArrayHashMap.MapEntry<K,V>[] entries
-
size
private int size
-
loadThreshold
private int loadThreshold
-
-
Method Detail
-
hash
static final int hash(java.lang.Object key)
-
setEntries
private void setEntries(ArrayHashMap.MapEntry[] entries)
-
size
public int size()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
get
public V get(java.lang.Object key)
-
clear
public void clear()
-
resizeIfLoadHigh
private void resizeIfLoadHigh(ArrayHashMap.MapEntry<K,V>[] table)
-
resize
private ArrayHashMap.MapEntry<K,V>[] resize(ArrayHashMap.MapEntry<K,V>[] table)
-
remove
public V remove(java.lang.Object key)
-
-