DthingApi
|
Public Member Functions | |
ArrayList (int capacity) | |
ArrayList () | |
ArrayList (Collection<? extends E > collection) | |
boolean | add (E object) |
void | add (int index, E object) |
boolean | addAll (Collection<? extends E > collection) |
boolean | addAll (int index, Collection<? extends E > collection) |
void | clear () |
Object | clone () |
void | ensureCapacity (int minimumCapacity) |
E | get (int index) |
int | size () |
boolean | isEmpty () |
boolean | contains (Object object) |
int | indexOf (Object object) |
int | lastIndexOf (Object object) |
E | remove (int index) |
boolean | remove (Object object) |
E | set (int index, E object) |
Object [] | toArray () |
void | trimToSize () |
Iterator< E > | iterator () |
int | hashCode () |
boolean | equals (Object o) |
![]() | |
void | add (int location, E object) |
boolean | add (E object) |
boolean | addAll (int location, Collection<? extends E > collection) |
void | clear () |
boolean | equals (Object object) |
abstract E | get (int location) |
int | hashCode () |
int | indexOf (Object object) |
Iterator< E > | iterator () |
int | lastIndexOf (Object object) |
ListIterator< E > | listIterator () |
ListIterator< E > | listIterator (int location) |
E | remove (int location) |
E | set (int location, E object) |
List< E > | subList (int start, int end) |
![]() | |
boolean | add (E object) |
boolean | addAll (Collection<? extends E > collection) |
void | clear () |
boolean | contains (Object object) |
boolean | containsAll (Collection<?> collection) |
boolean | isEmpty () |
abstract Iterator< E > | iterator () |
boolean | remove (Object object) |
boolean | removeAll (Collection<?> collection) |
boolean | retainAll (Collection<?> collection) |
abstract int | size () |
Object [] | toArray () |
String | toString () |
![]() | |
boolean | containsAll (Collection<?> collection) |
boolean | removeAll (Collection<?> collection) |
boolean | retainAll (Collection<?> collection) |
Protected Member Functions | |
void | removeRange (int fromIndex, int toIndex) |
![]() | |
AbstractList () | |
void | removeRange (int start, int end) |
![]() | |
AbstractCollection () | |
Additional Inherited Members | |
![]() | |
transient int | modCount |
ArrayList is an implementation of List, backed by an array. All optional operations including adding, removing, and replacing elements are supported.
All elements are permitted, including null.
This class is a good choice as your default
implementation. Vector synchronizes all operations, but not necessarily in a way that's meaningful to your application: synchronizing each call to
, for example, is not equivalent to synchronizing the list and iterating over it (which is probably what you intended). java.util.concurrent.CopyOnWriteArrayList is intended for the special case of very high concurrency, frequent traversals, and very rare mutations.
<E> | The element type of this list. |
|
inline |
|
inline |
|
inline |
Constructs a new instance of
containing the elements of the specified collection.
collection | the collection of elements to add. |
|
inline |
Adds the specified object at the end of this
.
object | the object to add. |
Implements java.util.List< E >.
|
inline |
Inserts the specified object into this
at the specified location. The object is inserted before any previous element at the specified location. If the location is equal to the size of this
, the object is added at the end.
index | the index at which to insert the object. |
object | the object to add. |
IndexOutOfBoundsException | when location < 0 || > size() |
Implements java.util.List< E >.
|
inline |
Adds the objects in the specified collection to this
.
collection | the collection of objects. |
Implements java.util.List< E >.
|
inline |
Inserts the objects in the specified collection at the specified location in this List. The objects are added in the order they are returned from the collection's iterator.
index | the index at which to insert. |
collection | the collection of objects. |
IndexOutOfBoundsException | when location < 0 || > size() |
Implements java.util.List< E >.
|
inline |
Removes all elements from this
, leaving it empty.
Implements java.util.List< E >.
|
inline |
Returns a new
with the same elements, the same size and the same capacity as this
.
|
inline |
Searches this
for the specified object.
object | the object to search for. |
Implements java.util.List< E >.
|
inline |
Ensures that after this operation the
can hold the specified number of elements without further growing.
minimumCapacity | the minimum capacity asked for. |
|
inline |
Compares the given object with the
, and returns true if they represent the same object using a class specific comparison. For
s, this means that they contain the same elements in exactly the same order.
object | the object to compare with this object. |
Implements java.util.List< E >.
|
inline |
Returns the element at the specified location in this
.
location | the index of the element to return. |
IndexOutOfBoundsException | if location < 0 || >= size() |
Implements java.util.List< E >.
|
inline |
Returns the hash code for this
. It is calculated by taking each element' hashcode and its position in the
into account.
Implements java.util.List< E >.
|
inline |
Searches this
for the specified object and returns the index of the first occurrence.
object | the object to search for. |
Implements java.util.List< E >.
|
inline |
Returns whether this
contains no elements.
Implements java.util.List< E >.
|
inline |
Returns an iterator on the elements of this
. The elements are iterated in the same order as they occur in the
.
Implements java.util.List< E >.
|
inline |
Searches this
for the specified object and returns the index of the last occurrence.
object | the object to search for. |
Implements java.util.List< E >.
|
inline |
Removes the object at the specified location from this list.
index | the index of the object to remove. |
IndexOutOfBoundsException | when location < 0 || >= size() |
Implements java.util.List< E >.
|
inline |
Removes the first occurrence of the specified object from this
.
object | the object to remove. |
UnsupportedOperationException | if removing from this List |
Implements java.util.List< E >.
|
inline |
Replaces the element at the specified location in this
with the specified object.
index | the index at which to put the specified object. |
object | the object to add. |
IndexOutOfBoundsException | when location < 0 || >= size() |
Implements java.util.List< E >.
|
inline |
Returns the number of elements in this
.
Implements java.util.List< E >.
|
inline |
Returns a new array containing all elements contained in this
.
Implements java.util.List< E >.
|
inline |