/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }
/** * Expand the absolute capacity of the builder so it can accept at least * the specified number of elements without being resized. */ private void ensureCapacity(int minCapacity) { if (contents.length < minCapacity) { this.contents = ObjectArrays.arraysCopyOf( this.contents, expandedCapacity(contents.length, minCapacity)); } }