Home | History | Annotate | Download | only in collect

Lines Matching refs:hash

394     int hash = map.hash(one);
395 ReferenceEntry<Object, Object> entry = segment.getEntry(one, hash);
441 int hashOne = map.hash(keyOne);
454 int hashTwo = map.hash(keyTwo);
473 hash(keyOne);
479 int hashTwo = map.hash(keyTwo);
523 int hash = map.hash(key);
526 int index = hash & (table.length() - 1);
528 ReferenceEntry<Object, Object> entry = map.newEntry(key, hash, null);
532 assertNull(segment.get(key, hash));
536 assertNull(segment.get(key, hash));
537 assertFalse(segment.containsKey(key, hash));
542 assertSame(value, segment.get(key, hash));
543 assertTrue(segment.containsKey(key, hash));
546 assertNull(segment.get(new Object(), hash));
549 DummyEntry<Object, Object> nullEntry = DummyEntry.create(null, hash, entry);
555 assertSame(value, segment.get(key, hash));
556 assertTrue(segment.containsKey(key, hash));
560 // hash collision
561 DummyEntry<Object, Object> dummy = DummyEntry.create(new Object(), hash, entry);
566 assertSame(value, segment.get(key, hash));
567 assertTrue(segment.containsKey(key, hash));
572 dummy = DummyEntry.create(key, hash, entry);
578 assertSame(dummyValue, segment.get(key, hash));
579 assertTrue(segment.containsKey(key, hash));
585 assertNull(segment.get(key, hash));
586 assertFalse(segment.containsKey(key, hash));
598 int hash = map.hash(key);
602 int index = hash & (table.length() - 1);
604 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
609 assertFalse(segment.replace(key, hash, oldValue, newValue));
616 assertSame(oldValue, segment.get(key, hash));
617 assertTrue(segment.replace(key, hash, oldValue, newValue));
619 assertSame(newValue, segment.get(key, hash));
622 assertFalse(segment.replace(key, hash, oldValue, newValue));
624 assertSame(newValue, segment.get(key, hash));
628 assertSame(oldValue, segment.get(key, hash));
630 assertFalse(segment.replace(key, hash, oldValue, newValue));
632 assertNull(segment.get(key, hash));
642 int hash = map.hash(key);
646 int index = hash & (table.length() - 1);
648 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
653 assertNull(segment.replace(key, hash, newValue));
660 assertSame(oldValue, segment.get(key, hash));
661 assertSame(oldValue, segment.replace(key, hash, newValue));
663 assertSame(newValue, segment.get(key, hash));
667 assertSame(oldValue, segment.get(key, hash));
669 assertNull(segment.replace(key, hash, newValue));
671 assertNull(segment.get(key, hash));
681 int hash = map.hash(key);
687 assertNull(segment.put(key, hash, oldValue, false));
691 assertSame(oldValue, segment.put(key, hash, newValue, false));
693 assertSame(newValue, segment.get(key, hash));
696 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
699 assertSame(oldValue, segment.get(key, hash));
701 assertNull(segment.put(key, hash, newValue, false));
703 assertSame(newValue, segment.get(key, hash));
713 int hash = map.hash(key);
719 assertNull(segment.put(key, hash, oldValue, true));
723 assertSame(oldValue, segment.put(key, hash, newValue, true));
725 assertSame(oldValue, segment.get(key, hash));
728 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
731 assertSame(oldValue, segment.get(key, hash));
733 assertNull(segment.put(key, hash, newValue, true));
735 assertSame(newValue, segment.get(key, hash));
748 int hash = map.hash(key);
749 assertNull(segment.put(key, hash, value, false));
781 int hash = map.hash(key);
784 int index = hash & (table.length() - 1);
786 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
792 assertNull(segment.remove(key, hash));
799 assertSame(oldValue, segment.get(key, hash));
800 assertSame(oldValue, segment.remove(key, hash));
802 assertNull(segment.get(key, hash));
808 assertSame(oldValue, segment.get(key, hash));
810 assertNull(segment.remove(key, hash));
812 assertNull(segment.get(key, hash));
820 int hash = map.hash(key);
824 int index = hash & (table.length() - 1);
826 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
832 assertNull(segment.remove(key, hash));
839 assertSame(oldValue, segment.get(key, hash));
840 assertTrue(segment.remove(key, hash, oldValue));
842 assertNull(segment.get(key, hash));
848 assertSame(oldValue, segment.get(key, hash));
849 assertFalse(segment.remove(key, hash, newValue));
851 assertSame(oldValue, segment.get(key, hash));
854 assertSame(oldValue, segment.get(key, hash));
856 assertFalse(segment.remove(key, hash, oldValue));
858 assertNull(segment.get(key, hash));
873 int hash = map.hash(key);
875 entry = map.newEntry(key, hash, entry);
912 int hashOne = map.hash(keyOne);
916 int hashTwo = map.hash(keyTwo);
920 int hashThree = map.hash(keyThree);
956 int hashOne = map.hash(keyOne);
960 int hashTwo = map.hash(keyTwo);
964 int hashThree = map.hash(keyThree);
1006 int hash = map.hash(key);
1011 entry = DummyEntry.create(key, hash, entry);
1064 int hash = map.hash(key);
1065 DummyEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1096 int hash = map.hash(key);
1097 DummyEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1100 assertFalse(segment.removeEntry(entry, hash, RemovalCause.COLLECTED));
1106 assertTrue(segment.removeEntry(entry, hash, RemovalCause.COLLECTED));
1107 assertNotificationEnqueued(map, key, value, hash);
1130 int hash = map.hash(key);
1131 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1136 assertFalse(segment.reclaimValue(key, hash, valueRef));
1142 assertTrue(segment.reclaimValue(key, hash, valueRef));
1156 assertFalse(segment.reclaimValue(key, hash, valueRef));
1158 assertTrue(segment.reclaimValue(key, hash, otherValueRef));
1177 int hash = map.hash(key);
1178 DummyEntry<Object, Object> entry = DummyEntry.create(key, hash, null);
1183 assertFalse(segment.clearValue(key, hash, valueRef));
1189 assertTrue(segment.clearValue(key, hash, valueRef));
1201 assertFalse(segment.clearValue(key, hash, valueRef));
1203 assertTrue(segment.clearValue(key, hash, valueRef));
1207 MapMakerInternalMap<K, V> map, K key, V value, int hash) {
1292 int hash = map.hash(key);
1295 ReferenceEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1333 int hash = map.hash(key);
1337 ReferenceEntry<Object, Object> entry = segment.getEntry(key, hash);
1375 int hash = map.hash(key);
1378 ReferenceEntry<Object, Object> entry = createDummyEntry(key, hash, value, null);
1476 int hash = map.hash(key);
1477 int index = hash & (table.length() - 1);
1479 entry = map.newEntry(key, hash, first);
1510 int hashOne = map.hash(keyOne);
1540 int hashOne = map.hash(keyOne);
1571 int hashOne = map.hash(keyOne);
1602 int hashOne = map.hash(keyOne);
1721 K key, int hash, V value, ReferenceEntry<K, V> next) {
1722 DummyEntry<K, V> entry = DummyEntry.create(key, hash, next);
1730 private final int hash;
1733 public DummyEntry(K key, int hash, ReferenceEntry<K, V> next) {
1735 this.hash = hash;
1739 public static <K, V> DummyEntry<K, V> create(K key, int hash, ReferenceEntry<K, V> next) {
1740 return new DummyEntry<K, V>(key, hash, next);
1766 return hash;