/** * Removes the element at the specified position from the receiver. * Shifts any subsequent elements to the left. * * @param index the index of the element to removed. * @throws IndexOutOfBoundsException if <tt>index < 0 || index >= size()</tt>. */ public void remove(int index) { removeFromTo(index, index); } /**
/** * Removes the element at the specified position from the receiver. Shifts * any subsequent elements to the left. * * @param index * the index of the element to removed. * @throws IndexOutOfBoundsException * if <tt>index < 0 || index >= size()</tt>. */ public void remove(int index) { removeFromTo(index, index); }
/** * Removes the element at the specified position from the receiver. * Shifts any subsequent elements to the left. * * @param index the index of the element to removed. * @throws IndexOutOfBoundsException if <tt>index < 0 || index >= size()</tt>. */ public void remove(int index) { removeFromTo(index, index); } /**
/** * Removes the element at the specified position from the receiver. Shifts * any subsequent elements to the left. * * @param index * the index of the element to removed. * @throws IndexOutOfBoundsException * if <tt>index < 0 || index >= size()</tt>. */ public void remove(int index) { removeFromTo(index, index); }
/** * Removes the element at the specified position from the receiver. Shifts * any subsequent elements to the left. * * @param index * the index of the element to removed. * @throws IndexOutOfBoundsException * if <tt>index < 0 || index >= size()</tt>. */ public void remove(int index) { removeFromTo(index, index); }
/** * Removes all elements from the receiver. The receiver will be empty after * this call returns, but keep its current capacity. */ public void clear() { removeFromTo(0, size() - 1); }
/** * Removes all elements from the receiver. The receiver will be empty after * this call returns, but keep its current capacity. */ public void clear() { removeFromTo(0, size() - 1); }
/** * Removes all elements from the receiver. The receiver will * be empty after this call returns, but keep its current capacity. */ public void clear() { removeFromTo(0,size()-1); } /**
/** * Removes all elements from the receiver. The receiver will * be empty after this call returns, but keep its current capacity. */ public void clear() { removeFromTo(0,size()-1); } /**
/** * Removes all elements from the receiver. The receiver will be empty after * this call returns, but keep its current capacity. */ public void clear() { removeFromTo(0, size() - 1); }
/** * Sets the size of the receiver. * If the new size is greater than the current size, new null or zero items are added to the end of the receiver. * If the new size is less than the current size, all components at index newSize and greater are discarded. * This method does not release any superfluos internal memory. Use method <tt>trimToSize</tt> to release superfluos internal memory. * @param newSize the new size of the receiver. * @throws IndexOutOfBoundsException if <tt>newSize < 0</tt>. */ public void setSize(int newSize) { if (newSize<0) throw new IndexOutOfBoundsException("newSize:"+newSize); int currentSize = size(); if (newSize!=currentSize) { if (newSize>currentSize) beforeInsertDummies(currentSize,newSize-currentSize); else if (newSize<currentSize) removeFromTo(newSize, currentSize-1); } } /**
/** * Sets the size of the receiver. * If the new size is greater than the current size, new null or zero items are added to the end of the receiver. * If the new size is less than the current size, all components at index newSize and greater are discarded. * This method does not release any superfluos internal memory. Use method <tt>trimToSize</tt> to release superfluos internal memory. * @param newSize the new size of the receiver. * @throws IndexOutOfBoundsException if <tt>newSize < 0</tt>. */ public void setSize(int newSize) { if (newSize<0) throw new IndexOutOfBoundsException("newSize:"+newSize); int currentSize = size(); if (newSize!=currentSize) { if (newSize>currentSize) beforeInsertDummies(currentSize,newSize-currentSize); else if (newSize<currentSize) removeFromTo(newSize, currentSize-1); } } /**
/** * Sets the size of the receiver. If the new size is greater than the * current size, new null or zero items are added to the end of the * receiver. If the new size is less than the current size, all components * at index newSize and greater are discarded. This method does not release * any superfluos internal memory. Use method <tt>trimToSize</tt> to release * superfluos internal memory. * * @param newSize * the new size of the receiver. * @throws IndexOutOfBoundsException * if <tt>newSize < 0</tt>. */ public void setSize(int newSize) { if (newSize < 0) throw new IndexOutOfBoundsException("newSize:" + newSize); int currentSize = size(); if (newSize != currentSize) { if (newSize > currentSize) beforeInsertDummies(currentSize, newSize - currentSize); else if (newSize < currentSize) removeFromTo(newSize, currentSize - 1); } }
/** * Sets the size of the receiver. If the new size is greater than the * current size, new null or zero items are added to the end of the * receiver. If the new size is less than the current size, all components * at index newSize and greater are discarded. This method does not release * any superfluos internal memory. Use method <tt>trimToSize</tt> to release * superfluos internal memory. * * @param newSize * the new size of the receiver. * @throws IndexOutOfBoundsException * if <tt>newSize < 0</tt>. */ public void setSize(int newSize) { if (newSize < 0) throw new IndexOutOfBoundsException("newSize:" + newSize); int currentSize = size(); if (newSize != currentSize) { if (newSize > currentSize) beforeInsertDummies(currentSize, newSize - currentSize); else if (newSize < currentSize) removeFromTo(newSize, currentSize - 1); } }
/** * Sets the size of the receiver. If the new size is greater than the * current size, new null or zero items are added to the end of the * receiver. If the new size is less than the current size, all components * at index newSize and greater are discarded. This method does not release * any superfluos internal memory. Use method <tt>trimToSize</tt> to release * superfluos internal memory. * * @param newSize * the new size of the receiver. * @throws IndexOutOfBoundsException * if <tt>newSize < 0</tt>. */ public void setSize(int newSize) { if (newSize < 0) throw new IndexOutOfBoundsException("newSize:" + newSize); int currentSize = size(); if (newSize != currentSize) { if (newSize > currentSize) beforeInsertDummies(currentSize, newSize - currentSize); else if (newSize < currentSize) removeFromTo(newSize, currentSize - 1); } }