org.scijava.util
Class DoubleArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<BaseType>
org.scijava.util.AbstractPrimitiveArray<double[],Double>
org.scijava.util.DoubleArray
- All Implemented Interfaces:
- Iterable<Double>, Collection<Double>, List<Double>, PrimitiveArray<double[],Double>, Sizable
public class DoubleArray
- extends AbstractPrimitiveArray<double[],Double>
An extensible array of double elements.
- Author:
- Johannes Schindelin, Curtis Rueden
|
Constructor Summary |
DoubleArray()
Constructs an extensible array of doubles, backed by a fixed-size array. |
DoubleArray(double[] array)
Constructs an extensible array of doubles, backed by the given fixed-size
array. |
DoubleArray(int size)
Constructs an extensible array of doubles, backed by a fixed-size array. |
| Methods inherited from class org.scijava.util.AbstractPrimitiveArray |
capacity, checkBounds, clear, copyArray, delete, ensureCapacity, getMaximumGrowth, insert, remove, setMaximumGrowth, setSize, size |
| Methods inherited from interface java.util.List |
add, addAll, equals, hashCode, isEmpty, iterator, listIterator, listIterator, retainAll, subList, toArray, toArray |
DoubleArray
public DoubleArray()
- Constructs an extensible array of doubles, backed by a fixed-size array.
DoubleArray
public DoubleArray(int size)
- Constructs an extensible array of doubles, backed by a fixed-size array.
- Parameters:
size - the initial size
DoubleArray
public DoubleArray(double[] array)
- Constructs an extensible array of doubles, backed by the given fixed-size
array.
- Parameters:
array - the array to wrap
addValue
public void addValue(double value)
removeValue
public boolean removeValue(double value)
getValue
public double getValue(int index)
setValue
public double setValue(int index,
double value)
addValue
public void addValue(int index,
double value)
indexOf
public int indexOf(double value)
lastIndexOf
public int lastIndexOf(double value)
contains
public boolean contains(double value)
getArray
public double[] getArray()
- Description copied from interface:
PrimitiveArray
- Gets the fixed-size array backing this instance.
- Returns:
- the backing array
setArray
public void setArray(double[] array)
- Description copied from interface:
PrimitiveArray
- Sets the fixed-size array backing this instance.
- Parameters:
array - the new backing array
get
public Double get(int index)
- Specified by:
get in interface List<Double>- Specified by:
get in class AbstractList<Double>
set
public Double set(int index,
Double element)
- Specified by:
set in interface List<Double>- Specified by:
set in class AbstractPrimitiveArray<double[],Double>
add
public void add(int index,
Double element)
- Specified by:
add in interface List<Double>- Specified by:
add in class AbstractPrimitiveArray<double[],Double>
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List<Double>- Overrides:
indexOf in class AbstractList<Double>
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf in interface List<Double>- Overrides:
lastIndexOf in class AbstractList<Double>
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection<Double>- Specified by:
contains in interface List<Double>- Overrides:
contains in class AbstractCollection<Double>
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection<Double>- Specified by:
remove in interface List<Double>- Overrides:
remove in class AbstractCollection<Double>
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll in interface Collection<Double>- Specified by:
containsAll in interface List<Double>- Overrides:
containsAll in class AbstractCollection<Double>
addAll
public boolean addAll(int index,
Collection<? extends Double> c)
- Specified by:
addAll in interface List<Double>- Overrides:
addAll in class AbstractList<Double>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll in interface Collection<Double>- Specified by:
removeAll in interface List<Double>- Overrides:
removeAll in class AbstractCollection<Double>
defaultValue
public Double defaultValue()
Copyright © 2009–2014 SciJava. All rights reserved.