Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 85) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/util/
DHashtable.java354 int hash = key.hashCode(); in containsKey() local
355 int index = (hash & 0x7FFFFFFF) % tab.length; in containsKey()
357 if ((e.hash == hash) && e.key.equals(key)) { in containsKey()
382 int hash = key.hashCode(); in get() local
383 int index = (hash & 0x7FFFFFFF) % tab.length; in get()
385 if ((e.hash == hash) && e.key.equals(key)) { in get()
431 int index = (e.hash & 0x7FFFFFFF) % newCapacity; in rehash()
438 private void addEntry(int hash, K key, V value, int index) { in addEntry() argument
445 hash = key.hashCode(); in addEntry()
446 index = (hash & 0x7FFFFFFF) % tab.length; in addEntry()
[all …]
DHashMap.java281 final int hash; field in HashMap.Node
286 Node(int hash, K key, V value, Node<K,V> next) { in Node() argument
287 this.hash = hash; in Node()
335 static final int hash(Object key) { in hash() method in HashMap
521 putVal(hash(key), key, value, false, evict); in putMapEntries()
573 Node<K,V>[] tab; Node<K,V> first, e; int n, hash; K k; in getNode() local
575 (first = tab[(n - 1) & (hash = hash(key))]) != null) { in getNode()
576 if (first.hash == hash && // always check first node in getNode()
581 return ((TreeNode<K,V>)first).getTreeNode(hash, key); in getNode()
583 if (e.hash == hash && in getNode()
[all …]
DLinkedHashMap.java225 Entry(int hash, K key, V value, Node<K,V> next) { in Entry() argument
226 super(hash, key, value, next); in Entry()
298 Node<K,V> newNode(int hash, K key, V value, Node<K,V> e) { in newNode() argument
300 new LinkedHashMap.Entry<>(hash, key, value, e); in newNode()
308 new LinkedHashMap.Entry<>(q.hash, q.key, q.value, next); in replacementNode()
313 TreeNode<K,V> newTreeNode(int hash, K key, V value, Node<K,V> next) { in newTreeNode() argument
314 TreeNode<K,V> p = new TreeNode<>(hash, key, value, next); in newTreeNode()
321 TreeNode<K,V> t = new TreeNode<>(q.hash, q.key, q.value, next); in replacementTreeNode()
344 removeNode(hash(key), key, null, false, true); in afterNodeInsertion()
734 return removeNode(hash(key), key, null, false, true) != null; in remove()
[all …]
DWeakHashMap.java302 final int hash(Object k) { in hash() method in WeakHashMap
327 int i = indexFor(e.hash, table.length); in expungeStaleEntries()
402 int h = hash(k); in get()
407 if (e.hash == h && matchesKey(e, k)) in get()
432 int h = hash(k); in getEntry()
436 while (e != null && !(e.hash == h && matchesKey(e, k))) in getEntry()
455 int h = hash(k); in put()
460 if (h == e.hash && matchesKey(e, k)) { in put()
528 int i = indexFor(e.hash, dest.length); in transfer()
596 int h = hash(k); in remove()
[all …]
/libcore/ojluni/src/test/java/nio/channels/Channels/
DBasic2.java74 if (reader.hash() != writer.hash()) in basic2Test()
85 private volatile int hash; field in Basic2.Reader
113 hash = hash ^ value; in run()
125 int hash() { return hash; } in hash() method in Basic2.Reader
131 private volatile int hash; field in Basic2.Writer
139 hash = 0; in run()
158 hash = hash ^ value; in run()
177 int hash() { return hash; } in hash() method in Basic2.Writer
/libcore/ojluni/src/main/java/sun/security/x509/
DDistributionPointName.java214 int hash = hashCode; in hashCode() local
215 if (hash == 0) { in hashCode()
216 hash = 1; in hashCode()
218 hash += fullName.hashCode(); in hashCode()
221 hash += relativeName.hashCode(); in hashCode()
223 hashCode = hash; in hashCode()
225 return hash; in hashCode()
DDistributionPoint.java344 int hash = hashCode; in hashCode() local
345 if (hash == 0) { in hashCode()
346 hash = 1; in hashCode()
348 hash += fullName.hashCode(); in hashCode()
351 hash += relativeName.hashCode(); in hashCode()
354 hash += crlIssuer.hashCode(); in hashCode()
359 hash += i; in hashCode()
363 hashCode = hash; in hashCode()
365 return hash; in hashCode()
/libcore/luni/src/main/java/libcore/reflect/
DAnnotationMember.java260 int hash = name.hashCode() * 127; in hashCode() local
264 return hash ^ Arrays.hashCode((int[])value); in hashCode()
266 return hash ^ Arrays.hashCode((byte[])value); in hashCode()
268 return hash ^ Arrays.hashCode((short[])value); in hashCode()
270 return hash ^ Arrays.hashCode((long[])value); in hashCode()
272 return hash ^ Arrays.hashCode((char[])value); in hashCode()
274 return hash ^ Arrays.hashCode((boolean[])value); in hashCode()
276 return hash ^ Arrays.hashCode((float[])value); in hashCode()
278 return hash ^ Arrays.hashCode((double[])value); in hashCode()
280 return hash ^ Arrays.hashCode((Object[])value); in hashCode()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DAclEntry.java72 private volatile int hash; field in AclEntry
359 private static int hash(int h, Object o) { in hash() method in AclEntry
372 if (hash != 0) in hashCode()
373 return hash; in hashCode()
375 h = hash(h, who); in hashCode()
376 h = hash(h, perms); in hashCode()
377 h = hash(h, flags); in hashCode()
378 hash = h; in hashCode()
379 return hash; in hashCode()
/libcore/ojluni/src/test/java/util/HashMap/
DTreeBinAssert.java160 final int hash; field in TreeBinAssert.Key
164 this.hash = desiredHash ^ (desiredHash >>> 16); in Key()
167 @Override public int hashCode() { return this.hash; } in hashCode()
174 return Integer.compare(this.hash, k.hash); in compareTo()
/libcore/ojluni/src/main/java/sun/util/calendar/
DEra.java131 private int hash = 0; field in Era
134 if (hash == 0) { in hashCode()
135 hash = name.hashCode() ^ abbr.hashCode() ^ (int)since ^ (int)(since >> 32) in hashCode()
138 return hash; in hashCode()
DCalendarDate.java414 long hash = ((((((long)year - 1970) * 12) + (month - 1)) * 30) + dayOfMonth) * 24; in hashCode() local
415 hash = ((((((hash + hours) * 60) + minutes) * 60) + seconds) * 1000) + millis; in hashCode()
416 hash -= zoneOffset; in hashCode()
424 return (int) hash * (int)(hash >> 32) ^ era ^ normalized ^ zone; in hashCode()
/libcore/luni/src/test/java/libcore/java/io/
DObjectStreamClassSuidTest.java131 ObjectStreamClass.suidCompatibilityListener = (c, hash) -> { in checkSerialVersionUID()
133 savedListener.warnDefaultSUIDTargetVersionDependent(clazz, hash); in checkSerialVersionUID()
136 assertEquals(expectedSUID, hash); in checkSerialVersionUID()
138 fail("Unexpected warning for " + c + " with defaultSUID " + hash); in checkSerialVersionUID()
/libcore/luni/src/test/java9compatibility/java/libcore/java/io/
DObjectStreamClassTest.java131 ObjectStreamClass.suidCompatibilityListener = (c, hash) -> { in checkSerialVersionUID()
133 savedListener.warnDefaultSUIDTargetVersionDependent(clazz, hash); in checkSerialVersionUID()
136 assertEquals(expectedSUID, hash); in checkSerialVersionUID()
138 fail("Unexpected warning for " + c + " with defaultSUID " + hash); in checkSerialVersionUID()
/libcore/ojluni/src/main/java/jdk/internal/util/
DNullableKeyValueHolder.java141 private int hash(Object obj) { in hash() method in NullableKeyValueHolder
151 return hash(key) ^ hash(value); in hashCode()
/libcore/ojluni/src/main/java/sun/util/locale/
DBaseLocale.java106 private volatile int hash; field in BaseLocale
266 int h = hash; in hashCode()
274 hash = h; in hashCode()
311 private final int hash; field in Key
328 this.hash = hashCode(locale); in Key()
332 return hash; in hashCode()
375 if (obj instanceof Key && this.hash == ((Key)obj).hash) { in equals()
/libcore/ojluni/src/main/java/java/lang/reflect/
DWeakCache.java299 private final int hash; field in WeakCache.CacheValue
303 this.hash = System.identityHashCode(value); // compare by identity in CacheValue()
308 return hash; in hashCode()
341 private final int hash; field in WeakCache.CacheKey
345 this.hash = System.identityHashCode(key); // compare by identity in CacheKey()
350 return hash; in hashCode()
DProxy.java455 private final int hash; field in Proxy.Key1
459 this.hash = intf.hashCode(); in Key1()
464 return hash; in hashCode()
482 private final int hash; field in Proxy.Key2
487 hash = 31 * intf1.hashCode() + intf2.hashCode(); in Key2()
493 return hash; in hashCode()
514 private final int hash; field in Proxy.KeyX
519 hash = Arrays.hashCode(interfaces); in KeyX()
528 return hash; in hashCode()
/libcore/ojluni/annotations/hiddenapi/java/lang/reflect/
DProxy.java155 private final int hash; field in Proxy.Key1
158 hash = 0;
178 private final int hash; field in Proxy.Key2
181 hash = 0;
227 private final int hash; field in Proxy.KeyX
230 hash = 0;
/libcore/ojluni/src/main/java/java/security/cert/
DCertificate.java71 private int hash = -1; // Default to -1 field in Certificate
130 int h = hash; in hashCode()
137 hash = h; in hashCode()
/libcore/ojluni/src/main/java/java/util/concurrent/
DExchanger.java310 int hash; // Pseudo-random for spins field in Exchanger.Node
377 for (int h = p.hash, spins = SPINS;;) { in arenaExchange()
382 p.hash = h; in arenaExchange()
412 p.hash = h; in arenaExchange()
485 int h = p.hash; in slotExchange()
517 p.hash = h; in slotExchange()
/libcore/ojluni/src/main/java/java/time/temporal/
DValueRange.java410 long hash = minSmallest + (minLargest << 16) + (minLargest >> 48) + in hashCode() local
413 return (int) (hash ^ (hash >>> 32)); in hashCode()
/libcore/luni/src/main/native/
Dorg_apache_harmony_xml_ExpatParser.cpp60 int hash; member
243 int hash = 0; in hashString() local
246 hash = hash * 31 + *s++; in hashString()
249 return hash; in hashString()
260 static InternedString* newInternedString(JNIEnv* env, const char* bytes, int hash) { in newInternedString() argument
279 wrapper->hash = hash; in newInternedString()
354 static jstring findInternedString(InternedString** bucket, const char* s, int hash) { in findInternedString() argument
357 if (current->hash != hash) continue; in findInternedString()
372 int hash = hashString(s); in internString() local
373 int bucketIndex = hash & (BUCKET_COUNT - 1); in internString()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java171 assertEquals(Arrays.hashCode(new Object[0]), Objects.hash()); in test_hash()
172 assertEquals(31, Objects.hash((Object) null)); in test_hash()
173 assertEquals(0, Objects.hash((Object[]) null)); in test_hash()
174 assertEquals(-1107615551, Objects.hash("hello", "world")); in test_hash()
175 assertEquals(23656287, Objects.hash("hello", "world", null)); in test_hash()
/libcore/ojluni/annotations/hiddenapi/java/util/
DHashMap.java50 static final int hash(java.lang.Object key) { in hash() method in HashMap
82 final java.util.HashMap.Node<K, V> getNode(int hash, java.lang.Object key) { in getNode() argument
94 final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { in putVal() argument
102 final void treeifyBin(java.util.HashMap.Node<K, V>[] tab, int hash) { in treeifyBin() argument
115 int hash, in removeNode() argument
218 int hash, K key, V value, java.util.HashMap.Node<K, V> next) { in newNode() argument
228 int hash, K key, V value, java.util.HashMap.Node<K, V> next) { in newTreeNode() argument
500 Node(int hash, K key, V value, java.util.HashMap.Node<K, V> next) { in Node() argument
528 final int hash; field in HashMap.Node
531 hash = 0;
[all …]

1234