public synchronized void removeAllElements ( ) { modCount ++ ; // Let gc do its work for ( int i = 0 ; i < elementCount ; i ++ ) elementData [ i ] = null ; elementCount = 0 ; }
Removes all components from this vector and sets its size to zero .