MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / Hashtable

Class Hashtable

Ports/CLDC11/src/java/util/Hashtable.java:38–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected