public final class ArrayDoubleList
extends java.lang.Object
Constructor and Description |
---|
ArrayDoubleList()
Creates an empty list
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Double element)
Appends the specified element to the end of this list
|
void |
add(int index,
java.lang.Double element)
Inserts the specified element at the specified position in this list.
Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). |
boolean |
addAll(java.util.Collection<? extends java.lang.Double> collection)
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
|
void |
addAll(double... values)
Loads an array of elements into the list
|
boolean |
addAll(int index,
java.util.Collection<? extends E> collection) |
protected boolean |
checkRange(int index)
Checks if the index is in the right range.
|
void |
clear()
Removes all of the elements from this list.
|
boolean |
contains(java.lang.Object object)
Returns true if this list contains the specified element.
|
boolean |
containsAll(java.util.Collection<?> collection)
Returns true if this list contains all of the elements of the specified collection.
|
java.lang.Double |
get(int index)
Returns the element at the specified position in this list.
|
int |
indexOf(java.lang.Object object)
Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the
element.
|
boolean |
isEmpty()
Returns true if this list contains no elements
|
java.util.Iterator<E> |
iterator()
Returns an iterator over the elements in this list in proper sequence.
|
int |
lastIndexOf(java.lang.Object object)
Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the
element.
|
java.util.ListIterator<E> |
listIterator()
Returns a list iterator over the elements in this list
|
java.util.ListIterator<E> |
listIterator(int index)
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the
list.
The specified index indicates the first element that would be returned by an initial call to next. An initial call to previous would return the element with the specified index minus one. |
java.lang.Double |
remove(int index)
Removes the element at the specified position in this list.
Shifts any subsequent elements to the left (subtracts one from their indices). |
boolean |
remove(java.lang.Object object)
Removes the first occurrence of the specified element from this list, if it is present.
|
boolean |
removeAll(java.util.Collection<?> collection)
Removes from this list all of its elements that are contained in the specified collection.
|
boolean |
retainAll(java.util.Collection<?> collection)
Retains only the elements in this list that are contained in the specified collection.
In other words, removes from this list all of its elements that are not contained in the specified collection. |
java.lang.Double |
set(int index,
java.lang.Double 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.
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Not implemented
|
java.lang.Object[] |
toArray()
Not implemented
|
<T> T[] |
toArray(T[] array)
Not implemented
|
java.lang.String |
toString() |
public void addAll(double... values)
values
- an array of elements to be loadedpublic boolean add(java.lang.Double element)
public boolean addAll(java.util.Collection<? extends java.lang.Double> collection)
public boolean retainAll(java.util.Collection<?> collection)
public void clear()
public java.lang.Double get(int index)
public java.lang.Double set(int index, java.lang.Double element)
public void add(int index, java.lang.Double element)
public java.lang.Double remove(int index)
public int indexOf(java.lang.Object object)
public int lastIndexOf(java.lang.Object object)
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Double>
toArray
in interface java.util.List<java.lang.Double>
public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.List<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
isEmpty
in interface java.util.List<E>
public boolean contains(java.lang.Object object)
contains
in interface java.util.Collection<E>
contains
in interface java.util.List<E>
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.List<E>
public final <T> T[] toArray(T[] array)
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public final boolean addAll(int index, java.util.Collection<? extends E> collection)
addAll
in interface java.util.List<E>
public final boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<E>
remove
in interface java.util.List<E>
public boolean containsAll(java.util.Collection<?> collection)
containsAll
in interface java.util.Collection<E>
containsAll
in interface java.util.List<E>
public final boolean removeAll(java.util.Collection<?> collection)
removeAll
in interface java.util.Collection<E>
removeAll
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
public java.util.List<E> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<E>
public final java.lang.String toString()
toString
in class java.lang.Object
protected final boolean checkRange(int index)
index
- index to be checkedtrue
if the index is in the right range otherwise false