public class FastAddVector extends AbstractList<Object> implements Serializable
modCount| Constructor and Description |
|---|
FastAddVector() |
FastAddVector(int i) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int idx,
CompatibleVectorHints obj) |
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list.
|
boolean |
add(Object o)
Appends the specified element to the end of this list.
|
boolean |
addAll(Collection<?> c)
Appends all of the elements in the specified Collection to the end of this
list, in the order that they are returned by the specified Collection's
Iterator.
|
boolean |
addAll(int index,
Collection<?> c)
Inserts all of the elements in the specified Collection into this list,
starting at the specified position.
|
boolean |
addOrderedDouble(Double obj) |
void |
clear()
Removes all of the elements from this list.
|
Object |
clone()
Returns a shallow copy of this ArrayList instance.
|
boolean |
contains(Object elem)
Returns true if this list contains the specified element.
|
void |
copyInto(Object[] obar) |
Object |
elementAt(int t) |
Enumeration<?> |
elements() |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this ArrayList instance, if necessary, to
ensure that it can hold at least the number of elements specified by the
minimum capacity argument.
|
Object |
get(int index)
Returns the element at the specified position in this list.
|
int |
indexOf(Object elem)
Searches for the first occurence of the given argument, testing for equality
using the equals method.
|
void |
insertElementAt(Object ob,
int i) |
boolean |
isEmpty()
Tests if this list has no elements.
|
Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence.
|
Object |
last() |
Object |
lastElement() |
int |
lastIndexOf(Object elem)
Returns the index of the last occurrence of the specified object in this
list.
|
Object |
remove(int index)
Removes the element at the specified position in this list.
|
boolean |
remove(Object obj) |
void |
removeAllElements() |
protected void |
removeRange(int fromIndex,
int toIndex)
Removes from this List all of the elements whose index is between fromIndex,
inclusive and toIndex, exclusive.
|
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the
specified element.
|
int |
size()
Returns the number of elements in this list.
|
Object[] |
toArray()
Returns an array containing all of the elements in this list in the correct
order.
|
Object[] |
toArray(Object[] obj)
Returns an array containing all of the elements in this list in the correct
order; the runtime type of the returned array is that of the specified array.
|
void |
trimToSize()
Trims the capacity of this ArrayList instance to be the list's
current size.
|
equals, hashCode, listIterator, listIterator, subListcontainsAll, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, listIterator, listIterator, removeAll, replaceAll, retainAll, sort, spliterator, subListparallelStream, removeIf, streampublic Iterator iterator()
This implementation returns a straightforward implementation of the iterator interface, relying on the backing list's size(), get(int), and remove(int) methods.
Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method unless the list's remove(int) method is overridden.
This implementation can be made to throw runtime exceptions in the face of concurrent modification, as described in the specification for the (protected) modCount field.
iterator in interface Iterable<Object>iterator in interface Collection<Object>iterator in interface List<Object>AbstractList.modCountpublic boolean addOrderedDouble(Double obj)
public Object last()
public void add(int idx,
CompatibleVectorHints obj)
public boolean remove(Object obj)
remove in interface Collection<Object>remove in interface List<Object>remove in class AbstractCollection<Object>public void clear()
public Object[] toArray()
public void removeAllElements()
public void copyInto(Object[] obar)
obar - public void insertElementAt(Object ob, int i)
public Object lastElement()
public Enumeration<?> elements()
public Object elementAt(int t)
public Object[] toArray(Object[] obj)
If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.
toArray in interface Collection<Object>toArray in interface List<Object>obj - the array into which the elements of the list are to be stored, if
it is big enough; otherwise, a new array of the same runtime type
is allocated for this purpose.public void trimToSize()
public void ensureCapacity(int minCapacity)
minCapacity - the desired minimum capacity.public int size()
size in interface Collection<Object>size in interface List<Object>size in class AbstractCollection<Object>public boolean isEmpty()
isEmpty in interface Collection<Object>isEmpty in interface List<Object>isEmpty in class AbstractCollection<Object>public boolean contains(Object elem)
contains in interface Collection<Object>contains in interface List<Object>contains in class AbstractCollection<Object>elem - element whose presence in this List is to be tested.true if the specified element is present;
false otherwise.public int indexOf(Object elem)
indexOf in interface List<Object>indexOf in class AbstractList<Object>elem - an object.Object.equals(Object)public int lastIndexOf(Object elem)
lastIndexOf in interface List<Object>lastIndexOf in class AbstractList<Object>elem - the desired element.public Object clone()
public Object get(int index)
get in interface List<Object>get in class AbstractList<Object>index - index of element to return.IndexOutOfBoundsException - if index is out of range (index
< 0 || index >= size()).public Object set(int index, Object element)
set in interface List<Object>set in class AbstractList<Object>index - index of element to replace.element - element to be stored at the specified position.IndexOutOfBoundsException - if index out of range
(index < 0 || index >= size()).public boolean add(Object o)
add in interface Collection<Object>add in interface List<Object>add in class AbstractList<Object>o - element to be appended to this list.public void add(int index,
Object element)
add in interface List<Object>add in class AbstractList<Object>index - index at which the specified element is to be inserted.element - element to be inserted.IndexOutOfBoundsException - if index is out of range
(index < 0 || index > size()).public Object remove(int index)
remove in interface List<Object>remove in class AbstractList<Object>index - the index of the element to removed.IndexOutOfBoundsException - if index out of range (index
< 0 || index >= size()).public boolean addAll(Collection<?> c)
addAll in interface Collection<Object>addAll in interface List<Object>addAll in class AbstractCollection<Object>c - the elements to be inserted into this list.NullPointerException - if the specified collection is null.public boolean addAll(int index,
Collection<?> c)
addAll in interface List<Object>addAll in class AbstractList<Object>index - index at which to insert first element from the specified
collection.c - elements to be inserted into this list.IndexOutOfBoundsException - if index out of range (index
< 0 || index > size()).NullPointerException - if the specified Collection is null.protected void removeRange(int fromIndex,
int toIndex)
removeRange in class AbstractList<Object>fromIndex - index of first element to be removed.toIndex - index after last element to be removed.Copyright © 2002–2019 Starter Inc.. All rights reserved.