Code: Select all
public class IdentityHashMap
extends AbstractMap
implements Map, java.io.Serializable, Cloneable
{
/**
* The initial capacity used by the no-args constructor.
* MUST be a power of two. The value 32 corresponds to the
* (specified) expected maximum size of 21, given a load factor
* of 2/3.
*/
private static final int DEFAULT_CAPACITY = 32;
// omitted
}
update update
Ich fand auch, dass ThreadLocal.Theadlocalmap Auch als Lastfaktor verwendet wird. Konflikte.
Code: Select all
/**
* Set the resize threshold to maintain at worst a 2/3 load factor.
*/
private void setThreshold(int len) {
threshold = len * 2 / 3;
}