/** * 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 */ public synchronized void setSize(int length) { if (length == elementCount) { return; } ensureCapacity(length); if (elementCount > length) { Arrays.fill(elementData, length, elementCount, null); } elementCount = length; modCount++; }
block.succ.ensureCapacity(block.succ.size() + branches.length);
result.ensureCapacity(recordcount);
result.ensureCapacity(recordcount);
public Manager() { hasBeenDone = true; alive = true; inProgress = true; // Already done: edits = new Vector<UndoableEdit>(); indexOfNextAdd = 0; limit = 100; edits.ensureCapacity(limit); }
result.ensureCapacity(recordcount);
/** * ctor */ public EditorUndoManager(AbstractFormManager formmgr, FormEditor editor) { m_formmgr = formmgr; m_editor = editor; m_indexOfNextAdd = 0; m_limit = 100; edits.ensureCapacity(m_limit); }
void add(int[] values) { v.ensureCapacity(v.size() + values.length); for (int i=0; i < values.length; i++) { v.addElement(new Integer(values[i])); } }
/** * append the given Argument to this Argument. All items * from the source argument are copied into this destination * argument. */ public void append(Argument arg) { items.ensureCapacity(items.size() + arg.items.size()); for (int i=0; i < arg.items.size(); i++) items.addElement(arg.items.elementAt(i)); }
/** * append the given Argument to this Argument. All items * from the source argument are copied into this destination * argument. */ public void append(Argument arg) { items.ensureCapacity(items.size() + arg.items.size()); for (int i=0; i < arg.items.size(); i++) items.addElement(arg.items.elementAt(i)); }
/** * @see java.util.Vector#ensureCapacity(int) */ @Override public void ensureCapacity(int minCapacity) { getDelegate().ensureCapacity(minCapacity); }
/** * Convenient method to merge the <tt>JUnitTest</tt>s of this batchtest * to a <tt>Vector</tt>. * @param v the vector to which should be added all individual tests of this * batch test. */ void addTestsTo(Vector<? super JUnitTest> v) { JUnitTest[] tests = createAllJUnitTest(); v.ensureCapacity(v.size() + tests.length); for (JUnitTest test : tests) { v.addElement(test); } }
/** * @see java.util.Vector#ensureCapacity(int) */ @Override public void ensureCapacity(int minCapacity) { getDelegate().ensureCapacity(minCapacity); }
/** * @see java.util.Vector#ensureCapacity(int) */ public void ensureCapacity(int minCapacity) { getDelegate().ensureCapacity(minCapacity); }
@Override protected void unserializeBodyFrom(RawDataBuffer in) { int size = in.readInt(); body.ensureCapacity(size); for (int n = 0 ; n < size ; n++) { Object value = in.readGeneric(); body.add(value); } }
public synchronized void ensureCapacity(int minCapacity) { if (!_directAccess && isDelayLoad()) { load(); } super.ensureCapacity(minCapacity); }
public synchronized void ensureCapacity(int minCapacity) { if (!_directAccess && isDelayLoad()) { load(); } super.ensureCapacity(minCapacity); }
public synchronized void ensureCapacity(int minCapacity) { if (!_directAccess && isDelayLoad()) { load(); } super.ensureCapacity(minCapacity); }
void add(PcmlDimensions values) { v.ensureCapacity(v.size() + values.size()); for (int i=0; i < values.size(); i++) { v.addElement(values.integerAt(i)); } }
@Test(expected = ReactiveAuditException.class) public void ensureCapacity() { ReactiveAudit.off.commit(); Vector vector=new Vector(); TestTools.strict.commit(); vector.ensureCapacity(0); } @Test(expected = ReactiveAuditException.class)