4849505152535455
initialCapacity <= maxCapacity, "initial capacity of %s cannot be larger than max of %s", initialCapacity, maxCapacity ); set = new TSynchronizedIntSet(new TIntHashSet(initialCapacity, MAX_LOAD_FACTOR, -1), mutex); this.maxCapacity = maxCapacity; }
5758596061626364
public IntegerHashSet(int maxCapacity) { this(Math.max(maxCapacity / 16, 1), maxCapacity); } private IntegerHashSet(IntegerHashSet set) { this.set = new TSynchronizedIntSet(new TIntHashSet(set.set), mutex); this.maxCapacity = set.maxCapacity; }