21.11
java.util.Vector
THE PACKAGE JAVA.UTIL
21.11.17
public final void removeAllElements()
All elements are removed from this
Vector
, making it empty.
21.11.18
public final boolean isEmpty()
The result is
true
if and only if this
Vector
is empty, that is, its size is zero.
21.11.19
public final int size()
The size of this
Vector
(the number of items it currently contains) is returned.
21.11.20
public final void setSize(int newSize)
The size of this
Vector
is changed to
newSize
. If the new size is smaller than the
old size, then items are removed from the end and discarded. If the new size is
larger than the old size, then the new items are set to
null
.
21.11.21
public final int capacity()
The current capacity of this
Vector
(the length of its internal data array, kept in
the field
elementData
) is returned.
21.11.22
public final void ensureCapacity(int minCapacity)
If the current capacity of this
Vector
is less than
minCapacity
, then its capacity
is increased by replacing its internal data array, kept in the field
elementData
( 21.11.1), with a larger one. The size of the new data array will be the old size
plus
capacityIncrement
( 21.11.3), unless the value of
capacityIncrement
is
nonpositive, in which case the new capacity will be twice the old capacity; but if
this new size is still smaller than
minCapacity
, then the new capacity will be
minCapacity
.
21.11.23
public final void trimToSize()
If the capacity of this
Vector
is larger than its current
size
( 21.11.19), then the
capacity is changed to equal the size by replacing its internal data array, kept in
the field
elementData
, with a smaller one.
658
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved