Home
last modified time | relevance | path

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

123

/libcore/ojluni/src/main/java/java/util/
DHashtable.java337 int hash = key.hashCode(); in containsKey() local
338 int index = (hash & 0x7FFFFFFF) % tab.length; in containsKey()
340 if ((e.hash == hash) && e.key.equals(key)) { in containsKey()
365 int hash = key.hashCode(); in get() local
366 int index = (hash & 0x7FFFFFFF) % tab.length; in get()
368 if ((e.hash == hash) && e.key.equals(key)) { in get()
414 int index = (e.hash & 0x7FFFFFFF) % newCapacity; in rehash()
421 private void addEntry(int hash, K key, V value, int index) { in addEntry() argument
430 hash = key.hashCode(); in addEntry()
431 index = (hash & 0x7FFFFFFF) % tab.length; in addEntry()
[all …]
DHashMap.java279 final int hash; field in HashMap.Node
284 Node(int hash, K key, V value, Node<K,V> next) { in Node() argument
285 this.hash = hash; in Node()
336 static final int hash(Object key) { in hash() method in HashMap
514 putVal(hash(key), key, value, false, evict); in putMapEntries()
556 return (e = getNode(hash(key), key)) == null ? null : e.value; in get()
566 final Node<K,V> getNode(int hash, Object key) { in getNode() argument
569 (first = tab[(n - 1) & hash]) != null) { in getNode()
570 if (first.hash == hash && // always check first node in getNode()
575 return ((TreeNode<K,V>)first).getTreeNode(hash, key); in getNode()
[all …]
DLinkedHashMap.java218 LinkedHashMapEntry(int hash, K key, V value, Node<K,V> next) { in LinkedHashMapEntry() argument
219 super(hash, key, value, next); in LinkedHashMapEntry()
279 Node<K,V> newNode(int hash, K key, V value, Node<K,V> e) { in newNode() argument
281 new LinkedHashMapEntry<K,V>(hash, key, value, e); in newNode()
289 new LinkedHashMapEntry<K,V>(q.hash, q.key, q.value, next); in replacementNode()
294 TreeNode<K,V> newTreeNode(int hash, K key, V value, Node<K,V> next) { in newTreeNode() argument
295 TreeNode<K,V> p = new TreeNode<K,V>(hash, key, value, next); in newTreeNode()
302 TreeNode<K,V> t = new TreeNode<K,V>(q.hash, q.key, q.value, next); in replacementTreeNode()
325 removeNode(hash(key), key, null, false, true); in afterNodeInsertion()
464 if ((e = getNode(hash(key), key)) == null) in get()
[all …]
DWeakHashMap.java297 final int hash(Object k) { in hash() method in WeakHashMap
322 int i = indexFor(e.hash, table.length); in expungeStaleEntries()
396 int h = hash(k); in get()
401 if (e.hash == h && eq(k, e.get())) in get()
426 int h = hash(k); in getEntry()
430 while (e != null && !(e.hash == h && eq(k, e.get()))) in getEntry()
449 int h = hash(k); in put()
454 if (h == e.hash && eq(k, e.get())) { in put()
523 int i = indexFor(e.hash, dest.length); in transfer()
591 int h = hash(k); in remove()
[all …]
DImmutableCollections.java210 int hash = 31 + e0.hashCode(); in hashCode() local
211 return 31 * hash + e1.hashCode(); in hashCode()
261 int hash = 1; in hashCode() local
263 hash = 31 * hash + e.hashCode(); in hashCode()
265 return hash; in hashCode()
707 int hash = 0;
711 hash += k.hashCode() ^ table[i + 1].hashCode();
714 return hash;
DIdentityHashMap.java293 private static int hash(Object x, int length) { in hash() method in IdentityHashMap
328 int i = hash(k, len); in get()
352 int i = hash(k, len); in containsKey()
393 int i = hash(k, len); in containsMapping()
425 int i = hash(k, len); in put()
479 int i = hash(key, newLength); in resize()
522 int i = hash(k, len); in remove()
554 int i = hash(k, len); in removeMapping()
599 int r = hash(item, len); in closeDeletion()
790 int r = hash(item, len); in remove()
[all …]
/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/main/java/sun/util/calendar/
DEra.java136 private int hash = 0; field in Era
139 if (hash == 0) { in hashCode()
140 hash = name.hashCode() ^ abbr.hashCode() ^ (int)since ^ (int)(since >> 32) in hashCode()
143 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/ojluni/src/main/java/sun/util/locale/
DBaseLocale.java48 private volatile int hash = 0; field in BaseLocale
155 int h = hash; in hashCode()
162 hash = h; in hashCode()
173 private final int hash; field in BaseLocale.Key
196 hash = h; in Key()
242 hash = h; in Key()
252 if (obj instanceof Key && this.hash == ((Key)obj).hash) { in equals()
277 return hash; in hashCode()
/libcore/luni/src/test/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/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/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/src/main/java/java/security/cert/
DCertificate.java70 private int hash = -1; // Default to -1 field in Certificate
129 int h = hash; in hashCode()
136 hash = h; in hashCode()
/libcore/ojluni/src/main/java/java/util/concurrent/
DExchanger.java315 int hash; // Pseudo-random for spins field in Exchanger.Node
378 for (int h = p.hash, spins = SPINS;;) { in arenaExchange()
383 p.hash = h; in arenaExchange()
411 p.hash = h; in arenaExchange()
484 int h = p.hash; in slotExchange()
514 p.hash = h; in slotExchange()
/libcore/ojluni/src/main/java/java/time/temporal/
DValueRange.java401 long hash = minSmallest + minLargest << 16 + minLargest >> 48 + maxSmallest << 32 + in hashCode() local
403 return (int) (hash ^ (hash >>> 32)); in hashCode()
/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/luni/src/main/native/
Dorg_apache_harmony_xml_ExpatParser.cpp59 int hash; member
242 int hash = 0; in hashString() local
245 hash = hash * 31 + *s++; in hashString()
248 return hash; in hashString()
259 static InternedString* newInternedString(JNIEnv* env, const char* bytes, int hash) { in newInternedString() argument
278 wrapper->hash = hash; in newInternedString()
353 static jstring findInternedString(InternedString** bucket, const char* s, int hash) { in findInternedString() argument
356 if (current->hash != hash) continue; in findInternedString()
371 int hash = hashString(s); in internString() local
372 int bucketIndex = hash & (BUCKET_COUNT - 1); in internString()
[all …]
/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 …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalTest.java355 BigDecimal hash = new BigDecimal("1.00"); in test_hashCode() local
358 hash.hashCode() != hash2.hashCode() && !hash.equals(hash2)); in test_hashCode()
361 hash.hashCode() != hash2.hashCode() && !hash.equals(hash2)); in test_hashCode()
364 assertTrue("hashCode of 1.00 and 1.00(bigInteger) is not equal", hash in test_hashCode()
366 && hash.equals(hash2)); in test_hashCode()
367 hash = new BigDecimal(value, 2); in test_hashCode()
369 assertTrue("hashCode of 123459.08 and -1233456.0000 is not equal", hash in test_hashCode()
371 && !hash.equals(hash2)); in test_hashCode()
373 assertTrue("hashCode of 123459.08 and -123459.08 is not equal", hash in test_hashCode()
375 && !hash.equals(hash2)); in test_hashCode()
/libcore/ojluni/src/main/java/java/net/
DURI.java492 private volatile transient int hash; // Zero ==> undefined field in URI
1452 if (hash != 0) in hashCode()
1453 return hash; in hashCode()
1455 h = hash(h, fragment); in hashCode()
1457 h = hash(h, schemeSpecificPart); in hashCode()
1459 h = hash(h, path); in hashCode()
1460 h = hash(h, query); in hashCode()
1462 h = hash(h, userInfo); in hashCode()
1466 h = hash(h, authority); in hashCode()
1469 hash = h; in hashCode()
[all …]

123