final int index = indexOf( hashCode,
this.table.length );
// scan the linked entries to see if it exists
if ( checkExists ) {
ObjectEntry current = (ObjectEntry) this.table[index];
while ( current != null ) {
if ( hashCode == current.cachedHashCode && this.comparator.equal( value,
current.value ) ) {
final Object oldValue = current.value;
current.value = value;
return true;
}
current = (ObjectEntry) current.getNext();
}
}
// We aren't checking the key exists, or it didn't find the key
final ObjectEntry entry = new ObjectEntry( value,
hashCode );
entry.next = this.table[index];
this.table[index] = entry;
if ( this.size++ >= this.threshold ) {