public class IlvDoubleArrayList extends Object implements Cloneable, Serializable
double
elements.
It is similar to the java.util.ArrayList
container class,
except that the values are of type double
,Constructor and Description |
---|
IlvDoubleArrayList()
Constructs an empty list with an initial capacity of ten.
|
IlvDoubleArrayList(double[] initialContents)
Constructs a list containing the elements of the specified array,
|
IlvDoubleArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Adds the given element to the end of this list.
|
void |
add(int index,
double value)
Adds the given element to this list, at the given position.
|
void |
clear()
Removes all elements from this list.
|
Object |
clone()
Returns a copy of this list.
|
void |
copyInto(double[] array)
Copies the elements of this list into the specified array.
|
void |
ensureCapacity(int minCapacity)
Increases the capacity of this list, if necessary, to ensure that it
can hold at least the number of elements specified by the minimum
capacity argument.
|
boolean |
equals(Object o)
Compares this object to another one.
|
double |
get(int index)
Returns the element at the specified position in this list.
|
int |
hashCode()
Returns a hash code for this object.
|
boolean |
isEmpty()
Returns
true if this list contains no elements. |
double |
remove(int index)
Removes the element at the specified position in this list.
|
void |
removeRange(int fromIndex,
int toIndex)
Removes from this list all of the elements whose index is between
fromIndex , inclusive, and toIndex , exclusive. |
double |
set(int index,
double value)
Replaces the element at the specified position in this list with the
given value.
|
int |
size()
Returns the number of elements in this list.
|
double[] |
toArray()
Returns an array containing all of the elements in this list.
|
String |
toString()
Returns a string representation of this list.
|
void |
trimToSize()
Trims the capacity of this list to the list's current size.
|
public IlvDoubleArrayList()
public IlvDoubleArrayList(int initialCapacity)
public IlvDoubleArrayList(double[] initialContents)
public int size()
public boolean isEmpty()
true
if this list contains no elements.public double get(int index)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public double set(int index, double value)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public void copyInto(double[] array)
public double[] toArray()
public void add(double value)
public void add(int index, double value)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index > size()
).public double remove(int index)
IndexOutOfBoundsException
- if the given index is out of range
(index < 0 || index >= size()
).public void removeRange(int fromIndex, int toIndex)
fromIndex
, inclusive, and toIndex
, exclusive.public void clear()
public void trimToSize()
public void ensureCapacity(int minCapacity)
public String toString()
public boolean equals(Object o)
Double.doubleToRawLongBits
).public int hashCode()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.