标签:pre size tables static capacity style 最小 bsp font
static final int tableSizeFor(int cap) { int n = cap - 1; n |= n >>> 1; n |= n >>> 2; n |= n >>> 4; n |= n >>> 8; n |= n >>> 16; return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1; }
得出结论:返回大于cap 的 最小二次幂的值
标签:pre size tables static capacity style 最小 bsp font
原文地址:https://www.cnblogs.com/baizhuang/p/10187184.html