
E - element type.public class Vector<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable
Vector is a wrapper around ArrayList.
See
the official Java API doc for details.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() |
void |
forEach(Consumer<? super E> consumer) |
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) |
boolean |
removeIf(Predicate<? super E> filter) |
protected void |
removeRange(int fromIndex,
int endIndex) |
void |
replaceAll(UnaryOperator<E> operator) |
E |
set(int index,
E elem) |
void |
setElementAt(E o,
int index) |
void |
setSize(int size) |
int |
size() |
void |
sort(Comparator<? super E> c) |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
void |
trimToSize() |
equals, hashCode, listIterator, listIteratorremove, retainAlllistIterator, listIterator, spliteratorparallelStream, remove, retainAll, streampublic 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 class AbstractList<E>public void add(int index,
E o)
public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<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 class AbstractList<E>public Object clone()
public boolean contains(Object elem)
contains in interface Collection<E>contains in class AbstractCollection<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<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 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 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 class AbstractCollection<E>public void removeAllElements()
public boolean removeElement(Object o)
public void removeElementAt(int index)
public boolean removeIf(Predicate<? super E> filter)
removeIf in interface Collection<E>public void replaceAll(UnaryOperator<E> operator)
replaceAll in interface List<E>public void setElementAt(E o, int index)
public void setSize(int size)
public int size()
size in interface Collection<E>public void sort(Comparator<? super E> c)
public Object[] toArray()
toArray in interface Collection<E>toArray in class AbstractCollection<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<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.