/guava/android/guava/src/com/google/common/collect/ImmutableSet.java
setSize = Math.max ( setSize, 2 ) ;
} static final int MAX_TABLE_SIZE = Ints.MAX_POWER_OF_TWO; private static final double DESIRED_LOAD_FACTOR = 0.7; private static final int CUTOFF = (int) (MAX_TABLE_SIZE * DESIRED_LOAD_FACTOR); @VisibleForTesting static int chooseTableSize(int setSize) { <extra_id_0> if (setSize < CUTOFF) { int tableSize = Integer.highestOneBit(setSize - 1) << 1; while (tableSize * DESIRED_LOAD_FACTOR < setSize) { tableSize <<= 1; } return tableSize;