E
- element type.public class Vector<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
Vector
is a wrapper around ArrayList
. [Sun
docs]modCount
Constructor and Description |
---|
Vector() |
Vector(Collection<? extends E> c) |
Vector(int initialCapacity) |
Vector(int initialCapacity,
int ignoredCapacityIncrement)
Capacity increment is ignored.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
add(int index,
E o) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
addElement(E o) |
int |
capacity() |
void |
clear() |
Object |
clone() |
boolean |
contains(Object elem) |
boolean |
containsAll(Collection<?> c) |
void |
copyInto(Object[] objs) |
E |
elementAt(int index) |
Enumeration<E> |
elements() |
void |
ensureCapacity(int capacity) |
E |
firstElement() |
E |
get(int index) |
int |
indexOf(Object elem) |
int |
indexOf(Object elem,
int index) |
void |
insertElementAt(E o,
int index) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
E |
lastElement() |
int |
lastIndexOf(Object o) |
int |
lastIndexOf(Object o,
int index) |
E |
remove(int index) |
boolean |
removeAll(Collection<?> c) |
void |
removeAllElements() |
boolean |
removeElement(Object o) |
void |
removeElementAt(int index) |
protected void |
removeRange(int fromIndex,
int endIndex) |
E |
set(int index,
E elem) |
void |
setElementAt(E o,
int index) |
void |
setSize(int size) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
void |
trimToSize() |
equals, hashCode, listIterator, listIterator
remove, retainAll
equals, hashCode, listIterator, listIterator, remove, retainAll
public Vector()
public Vector(Collection<? extends E> c)
public Vector(int initialCapacity)
public Vector(int initialCapacity, int ignoredCapacityIncrement)
public boolean add(E o)
add
in interface Collection<E>
add
in interface List<E>
add
in class AbstractList<E>
public void add(int index, E o)
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface List<E>
addAll
in class AbstractCollection<E>
public boolean addAll(int index, Collection<? extends E> c)
public void addElement(E o)
public int capacity()
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class AbstractList<E>
public Object clone()
public boolean contains(Object elem)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in class AbstractCollection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class AbstractCollection<E>
public void copyInto(Object[] objs)
public E elementAt(int index)
public Enumeration<E> elements()
public void ensureCapacity(int capacity)
public E firstElement()
public E get(int index)
public int indexOf(Object elem)
public int indexOf(Object elem, int index)
public void insertElementAt(E o, int index)
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
isEmpty
in class AbstractCollection<E>
public E lastElement()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
lastIndexOf
in class AbstractList<E>
public int lastIndexOf(Object o, int index)
public E remove(int index)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
removeAll
in class AbstractCollection<E>
public void removeAllElements()
public boolean removeElement(Object o)
public void removeElementAt(int index)
public void setElementAt(E o, int index)
public void setSize(int size)
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class AbstractCollection<E>
public String toString()
toString
in class AbstractCollection<E>
public void trimToSize()
protected void removeRange(int fromIndex, int endIndex)
removeRange
in class AbstractList<E>
Copyright © 2018. All rights reserved.