bucket.zero = bucket.removeLast(0); return; case 1: bucket.one = bucket.removeLast(1); return; case 2: bucket.two = bucket.removeLast(2); return; case 3:
this.removeLongChain(this, i - 3); this.zero = this.removeLast(0); return; case 1: this.one = this.removeLast(1); return; case 2: this.two = this.removeLast(2); return; case 3: if (this.three instanceof ChainedBucket) this.removeLongChain(this, i - 3); return;
bucket.three = new ChainedBucket(bucket.three, realKey); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], realKey); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.three = new ChainedBucket(bucket.three, key); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], key); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return this.nonSentinel(result); bucket.two = bucket.removeLast(2); this.occupied--; return this.nonSentinel(result); bucket.three = bucket.removeLast(3); this.occupied--; return this.nonSentinel(result);
if (this.nonNullTableObjectEquals(bucket.zero, key)) bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return true; bucket.two = bucket.removeLast(2); this.occupied--; return true; bucket.three = bucket.removeLast(3); this.occupied--; return true;
bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return this.nonSentinel(result); bucket.two = bucket.removeLast(2); this.occupied--; return this.nonSentinel(result); bucket.three = bucket.removeLast(3); this.occupied--; return this.nonSentinel(result);
bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return true; bucket.two = bucket.removeLast(2); this.occupied--; return true; bucket.three = bucket.removeLast(3); this.occupied--; return true;
bucket.zero = bucket.removeLast(0); return; case 1: bucket.one = bucket.removeLast(1); return; case 2: bucket.two = bucket.removeLast(2); return; case 3:
this.removeLongChain(this, i - 3); this.zero = this.removeLast(0); return; case 1: this.one = this.removeLast(1); return; case 2: this.two = this.removeLast(2); return; case 3: if (this.three instanceof ChainedBucket) this.removeLongChain(this, i - 3); return;
public Object removeLast(int cur) { if (this.three instanceof ChainedBucket) { return this.removeLast(this); } if (this.three != null) { Object result = this.three; this.three = null; return cur == 3 ? null : result; } if (this.two != null) { Object result = this.two; this.two = null; return cur == 2 ? null : result; } if (this.one != null) { Object result = this.one; this.one = null; return cur == 1 ? null : result; } this.zero = null; return null; }
return; bucket.three = new ChainedBucket(bucket.three, key); return; ChainedBucket newBucket = new ChainedBucket(this.table[index], key); this.table[index] = newBucket;
public ChainedBucket copy() { ChainedBucket result = new ChainedBucket(); ChainedBucket dest = result; ChainedBucket src = this; do { dest.zero = src.zero; dest.one = src.one; dest.two = src.two; if (src.three instanceof ChainedBucket) { dest.three = new ChainedBucket(); src = (ChainedBucket) src.three; dest = (ChainedBucket) dest.three; continue; } dest.three = src.three; return result; } while (true); } }
public UnifiedSet(UnifiedSet<T> set) { this.maxSize = set.maxSize; this.loadFactor = set.loadFactor; this.occupied = set.occupied; this.allocateTable(set.table.length); for (int i = 0; i < set.table.length; i++) { Object key = set.table[i]; if (key instanceof ChainedBucket) { this.table[i] = ((ChainedBucket) key).copy(); } else if (key != null) { this.table[i] = key; } } }
bucket.three = new ChainedBucket(bucket.three, realKey); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], realKey); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.three = new ChainedBucket(bucket.three, realKey); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], realKey); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.three = new ChainedBucket(bucket.three, realKey); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], realKey); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.three = new ChainedBucket(bucket.three, realKey); if (++this.occupied > this.maxSize) ChainedBucket newBucket = new ChainedBucket(this.table[index], realKey); this.table[index] = newBucket; if (++this.occupied > this.maxSize)
bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return this.nonSentinel(result); bucket.two = bucket.removeLast(2); this.occupied--; return this.nonSentinel(result); bucket.three = bucket.removeLast(3); this.occupied--; return this.nonSentinel(result);
if (this.nonNullTableObjectEquals(bucket.zero, key)) bucket.zero = bucket.removeLast(0); if (bucket.zero == null) bucket.one = bucket.removeLast(1); this.occupied--; return true; bucket.two = bucket.removeLast(2); this.occupied--; return true; bucket.three = bucket.removeLast(3); this.occupied--; return true;