MCPcopy Index your code
hub / github.com/davidgiven/luje / Hashtable

Class Hashtable

lib/java/util/Hashtable.java:37–973  ·  view source on GitHub ↗

Hashtable associates keys with values. Both keys and values cannot be null. The size of the Hashtable is the number of key/value pairs it contains. The capacity is the number of key/value pairs the Hashtable can hold. The load factor is a float value which determines how full the Hashtable gets befo

Source from the content-addressed store, hash-verified

35 */
36
37public class Hashtable<K, V> extends Dictionary<K, V> implements Map<K, V>,
38 Cloneable, Serializable {
39
40 private static final long serialVersionUID = 1421746759512286392L;
41
42 transient int elementCount;
43
44 transient Entry<K, V>[] elementData;
45
46 private float loadFactor;
47
48 private int threshold;
49
50 transient int firstSlot;
51
52 transient int lastSlot = -1;
53
54 transient int modCount;
55
56 private static final Enumeration<?> EMPTY_ENUMERATION = new Enumeration<Object>() {
57 public boolean hasMoreElements() {
58 return false;
59 }
60
61 public Object nextElement() {
62 throw new NoSuchElementException();
63 }
64 };
65
66 private static final Iterator<?> EMPTY_ITERATOR = new Iterator<Object>() {
67
68 public boolean hasNext() {
69 return false;
70 }
71
72 public Object next() {
73 throw new NoSuchElementException();
74 }
75
76 public void remove() {
77 throw new IllegalStateException();
78 }
79 };
80
81 private static <K, V> Entry<K, V> newEntry(K key, V value, int hash) {
82 return new Entry<K, V>(key, value);
83 }
84
85 private static class Entry<K, V> extends MapEntry<K, V> {
86 Entry<K, V> next;
87
88 final int hashcode;
89
90 Entry(K theKey, V theValue) {
91 super(theKey, theValue);
92 hashcode = theKey.hashCode();
93 }
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected