Lines Matching defs:key
34 * An entry will automatically be removed when its key is no longer
35 * in ordinary use. Both null values and the null key are supported.
43 private static final Object NULL = new Object(); // special object for null key
49 private int size = 0; // the number of key-value mappings
51 public T get(Object key) {
53 if (key == null) {
54 key = NULL;
56 int hash = key.hashCode();
59 if (entry.isMatched(key, hash)) {
66 public T put(Object key, T value) {
68 if (key == null) {
69 key = NULL;
71 int hash = key.hashCode();
74 if (entry.isMatched(key, hash)) {
80 this.table[index] = new Entry<T>(key, hash, value, this.queue, this.table[index]);
139 Object key = entry.get();
140 if (key == null) {
170 Entry(Object key, int hash, T value, ReferenceQueue<Object> queue, Entry<T> next) {
171 super(key, queue);
177 boolean isMatched(Object key, int hash) {
178 return (this.hash == hash) && (key == get());