public class PVector<E> extends PAbstractList<E> implements List<E>, Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
capacityIncrement |
protected int |
elementCount |
protected Object[] |
elementData |
instanceFactory
Constructor and Description |
---|
PVector() |
PVector(Collection<? extends E> collection) |
PVector(int initialCapacity) |
PVector(int initialCapacity,
int capacityIncrement) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> collection) |
boolean |
addAll(int index,
Collection<? extends E> collection) |
void |
addElement(E element) |
int |
capacity() |
void |
clear() |
Object |
clone() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
void |
copyInto(Object[] anArray) |
E |
elementAt(int index) |
Enumeration<E> |
elements() |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object object) |
E |
firstElement() |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object object) |
int |
indexOf(Object oject,
int index) |
void |
insertElementAt(E element,
int index) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
E |
lastElement() |
int |
lastIndexOf(Object object) |
int |
lastIndexOf(Object object,
int index) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
static PVector |
newInstance(IInstanceFactory instanceFactory) |
static PVector |
newInstance(IInstanceFactory instanceFactory,
Collection collection) |
static PVector |
newInstance(IInstanceFactory instanceFactory,
int initialCapacity) |
static PVector |
newInstance(IInstanceFactory instanceFactory,
int initialCapacity,
int capacityIncrement) |
E |
remove(int index) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
void |
removeAllElements() |
boolean |
removeElement(Object object) |
void |
removeElementAt(int index) |
protected void |
removeRange(int fromIndex,
int toIndex) |
boolean |
retainAll(Collection<?> collection) |
E |
set(int index,
E element) |
void |
setElementAt(E element,
int index) |
void |
setElementData(Object[] elementData) |
void |
setSize(int newSize) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
void |
trimToSize() |
protected Object[] elementData
protected int elementCount
protected int capacityIncrement
public PVector(int initialCapacity, int capacityIncrement)
public PVector(int initialCapacity)
public PVector()
public PVector(Collection<? extends E> collection)
public static PVector newInstance(IInstanceFactory instanceFactory, int initialCapacity, int capacityIncrement)
public static PVector newInstance(IInstanceFactory instanceFactory, int initialCapacity)
public static PVector newInstance(IInstanceFactory instanceFactory)
public static PVector newInstance(IInstanceFactory instanceFactory, Collection collection)
public ListIterator<E> listIterator()
listIterator
in interface List<E>
listIterator
in class PAbstractList<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
listIterator
in class PAbstractList<E>
public void copyInto(Object[] anArray)
public void trimToSize()
public void ensureCapacity(int minCapacity)
public void setSize(int newSize)
public int capacity()
public int size()
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
isEmpty
in class PAbstractCollection<E>
public Enumeration<E> elements()
public boolean contains(Object object)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in class PAbstractCollection<E>
public int indexOf(Object object)
public int indexOf(Object oject, int index)
public int lastIndexOf(Object object)
lastIndexOf
in interface List<E>
lastIndexOf
in class PAbstractList<E>
public int lastIndexOf(Object object, int index)
public E elementAt(int index)
public E firstElement()
public E lastElement()
public void setElementAt(E element, int index)
public void removeElementAt(int index)
public void insertElementAt(E element, int index)
public void addElement(E element)
public boolean removeElement(Object object)
public void removeAllElements()
public void setElementData(Object[] elementData)
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class PAbstractCollection<E>
public <T> T[] toArray(T[] array)
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class PAbstractCollection<E>
public E get(int index)
public boolean add(E element)
add
in interface Collection<E>
add
in interface List<E>
add
in class PAbstractList<E>
public boolean remove(Object object)
remove
in interface Collection<E>
remove
in interface List<E>
remove
in class PAbstractCollection<E>
public void add(int index, E element)
public E remove(int index)
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class PAbstractCollection<E>
public boolean containsAll(Collection<?> collection)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class PAbstractCollection<E>
public boolean addAll(Collection<? extends E> collection)
addAll
in interface Collection<E>
addAll
in interface List<E>
addAll
in class PAbstractCollection<E>
public boolean removeAll(Collection<?> collection)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
removeAll
in class PAbstractCollection<E>
public boolean retainAll(Collection<?> collection)
retainAll
in interface Collection<E>
retainAll
in interface List<E>
retainAll
in class PAbstractCollection<E>
public boolean addAll(int index, Collection<? extends E> collection)
public boolean equals(Object object)
public int hashCode()
public String toString()
toString
in class PAbstractCollection<E>
protected void removeRange(int fromIndex, int toIndex)
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.