LongHashMapEntry removeKey(long l) { int i = getHashedKey(l); int j = getHashIndex(i, hashArray.Length); LongHashMapEntry longhashmapentry = hashArray[j]; LongHashMapEntry longhashmapentry1; LongHashMapEntry longhashmapentry2; for (longhashmapentry1 = longhashmapentry; longhashmapentry1 != null; longhashmapentry1 = longhashmapentry2) { longhashmapentry2 = longhashmapentry1.nextEntry; if (longhashmapentry1.key == l) { modCount++; numHashElements--; if (longhashmapentry == longhashmapentry1) { hashArray[j] = longhashmapentry2; } else { longhashmapentry.nextEntry = longhashmapentry2; } return(longhashmapentry1); } longhashmapentry = longhashmapentry1; } return(longhashmapentry1); }
public LongHashMapEntry(int i, long l, Object obj, LongHashMapEntry longhashmapentry) { value = obj; nextEntry = longhashmapentry; key = l; field_1026_d = i; }
public LongHashMapEntry(int i, long l, Object obj, LongHashMapEntry playerhashentry) { value = obj; nextEntry = playerhashentry; key = l; field_1026_d = i; }
private void createKey(int i, long l, Object obj, int j) { LongHashMapEntry longhashmapentry = hashArray[j]; hashArray[j] = new LongHashMapEntry(i, l, obj, longhashmapentry); if (numHashElements++ >= capacity) { resizeTable(2 * hashArray.Length); } }
LongHashMapEntry func_35507_c(long l) { int i = getHashedKey(l); for (LongHashMapEntry longhashmapentry = hashArray[getHashIndex(i, hashArray.Length)]; longhashmapentry != null; longhashmapentry = longhashmapentry.nextEntry) { if (longhashmapentry.key == l) { return(longhashmapentry); } } return(null); }
public Object getValueByKey(long l) { int i = getHashedKey(l); for (LongHashMapEntry longhashmapentry = hashArray[getHashIndex(i, hashArray.Length)]; longhashmapentry != null; longhashmapentry = longhashmapentry.nextEntry) { if (longhashmapentry.key == l) { return(longhashmapentry.value); } } return(null); }
public void add(long l, Object obj) { int i = getHashedKey(l); int j = getHashIndex(i, hashArray.Length); for (LongHashMapEntry longhashmapentry = hashArray[j]; longhashmapentry != null; longhashmapentry = longhashmapentry.nextEntry) { if (longhashmapentry.key == l) { longhashmapentry.value = obj; } } modCount++; createKey(i, l, obj, j); }
private void resizeTable(int i) { LongHashMapEntry[] alonghashmapentry = hashArray; int j = alonghashmapentry.Length; if (j == 0x40000000) { capacity = 0x7fffffff; return; } else { LongHashMapEntry[] aplayerhashentry1 = new LongHashMapEntry[i]; copyHashTableTo(aplayerhashentry1); hashArray = aplayerhashentry1; capacity = (int)((float)i * percentUsable); return; } }
public override bool Equals(object obj) { if (!(obj is LongHashMapEntry)) { return(false); } LongHashMapEntry longhashmapentry = (LongHashMapEntry)obj; long long1 = func_736_a(); long long2 = longhashmapentry.func_736_a(); if (long1 == long2 || long1 != null && long1.Equals(long2)) { object obj1 = func_735_b(); object obj2 = longhashmapentry.func_735_b(); if (obj1 == obj2 || obj1 != null && obj1.Equals(obj2)) { return(true); } } return(false); }
private void copyHashTableTo(LongHashMapEntry[] alonghashmapentry) { LongHashMapEntry[] alonghashmapentry1 = hashArray; int i = alonghashmapentry.Length; for (int j = 0; j < alonghashmapentry1.Length; j++) { LongHashMapEntry longhashmapentry = alonghashmapentry1[j]; if (longhashmapentry == null) { continue; } alonghashmapentry1[j] = null; do { LongHashMapEntry playerhashentry1 = longhashmapentry.nextEntry; int k = getHashIndex(longhashmapentry.field_1026_d, i); longhashmapentry.nextEntry = alonghashmapentry[k]; alonghashmapentry[k] = longhashmapentry; longhashmapentry = playerhashentry1; } while(longhashmapentry != null); } }
public LongHashMap() { capacity = 12; hashArray = new LongHashMapEntry[16]; }
public Object remove(long l) { LongHashMapEntry longhashmapentry = removeKey(l); return(longhashmapentry != null ? longhashmapentry.value : null); }
private void copyHashTableTo(LongHashMapEntry[] alonghashmapentry) { LongHashMapEntry[] alonghashmapentry1 = hashArray; int i = alonghashmapentry.Length; for(int j = 0; j < alonghashmapentry1.Length; j++) { LongHashMapEntry longhashmapentry = alonghashmapentry1[j]; if(longhashmapentry == null) { continue; } alonghashmapentry1[j] = null; do { LongHashMapEntry playerhashentry1 = longhashmapentry.nextEntry; int k = getHashIndex(longhashmapentry.field_1026_d, i); longhashmapentry.nextEntry = alonghashmapentry[k]; alonghashmapentry[k] = longhashmapentry; longhashmapentry = playerhashentry1; } while(longhashmapentry != null); } }
private void resizeTable(int i) { LongHashMapEntry[] alonghashmapentry = hashArray; int j = alonghashmapentry.Length; if(j == 0x40000000) { capacity = 0x7fffffff; return; } else { LongHashMapEntry[] aplayerhashentry1 = new LongHashMapEntry[i]; copyHashTableTo(aplayerhashentry1); hashArray = aplayerhashentry1; capacity = (int)((float)i * percentUsable); return; } }
private void createKey(int i, long l, Object obj, int j) { LongHashMapEntry longhashmapentry = hashArray[j]; hashArray[j] = new LongHashMapEntry(i, l, obj, longhashmapentry); if(numHashElements++ >= capacity) { resizeTable(2 * hashArray.Length); } }