MCPcopy Index your code
hub / github.com/davidgiven/luje / setSize

Method setSize

lib/java/util/Vector.java:913–923  ·  view source on GitHub ↗

Sets the size of this vector to the specified size. If there are more than length elements in this vector, the elements at end are lost. If there are less than length elements in the vector, the additional elements contain null. @param length the new size of this vector. @see #size

(int length)

Source from the content-addressed store, hash-verified

911 * @see #size
912 */
913 public synchronized void setSize(int length) {
914 if (length == elementCount) {
915 return;
916 }
917 ensureCapacity(length);
918 if (elementCount > length) {
919 Arrays.fill(elementData, length, elementCount, null);
920 }
921 elementCount = length;
922 modCount++;
923 }
924
925 /**
926 * Returns the number of elements in this vector.

Callers

nothing calls this directly

Calls 2

ensureCapacityMethod · 0.95
fillMethod · 0.95

Tested by

no test coverage detected