MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / setSize

Method setSize

Ports/CLDC11/src/java/util/Vector.java:1044–1054  ·  view source on GitHub ↗
(int length)

Source from the content-addressed store, hash-verified

1042 ///
1043 /// - #size
1044 public synchronized void setSize(int length) {
1045 if (length == elementCount) {
1046 return;
1047 }
1048 ensureCapacity(length);
1049 if (elementCount > length) {
1050 Arrays.fill(elementData, length, elementCount, null);
1051 }
1052 elementCount = length;
1053 modCount++;
1054 }
1055
1056 /// Returns the number of elements in this vector.
1057 ///

Callers

nothing calls this directly

Calls 2

ensureCapacityMethod · 0.95
fillMethod · 0.95

Tested by

no test coverage detected