Vector class is the implementation of the list interface, so the method of inheritance is not here to say
Https://www.cnblogs.com/xiaostudy/p/9503199.html
Public void
add(int index, E Element)
The element element is added from the position of the index, and subsequent elements are shifted back one bit.
Public Boolean
addall(int index, Collection<? extends E> C)
Add all the elements from the C collection starting at the index position, and the subsequent elements move backward through the c.size () bit.
Public void
addelement(E obj)
Adding an element after the collection, regardless of the type of the element, adds the return value of his ToString ().
public int
capacity()
Returns the current capacity of this vector, not the number of elements.
View the vector class's constructors
Visible, the parameterless constructor is the default 10 capacity size
Public void
copyinto(Object[] anarray)
Copy the elements in the collection into the Anarray array
public E
elementat(int index)
Returns the element of the index position
Public Enumeration<E>
elements()
Returns an enumeration of collections
Public void
ensurecapacity(int mincapacity)
Increase the capacity of the collection, if the increased capacity is less than 10, then invalid, that is, increase the capacity of 10 times times
Public void
insertelementat(E obj, int index)
Inserts an OBJ element in the specified index position
Public void
removeallelements()
Delete all the elements of the collection, and set the capacity to 0, as with the clear () method, the clear bottom layer is also used with the Removeallelements () method
The measured capacity is not 0, it's time to look for problems.
Public void
setSize(int newSize)
Sets the size of the collection to NewSize, and if newsize is greater than the number of collection elements, then NULL is added later, and if NewSize is less than the number of collection elements, the newsize element is reserved
Public void
trimtosize()
The capacity size of the collection, if the number of collection elements equals the size of the capacity, then there is no change, if the number of collections is less than the capacity size, then the capacity is set to the number of elements
Common methods of vector classes in Java