org.scijava.util
Class FloatArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<BaseType>
org.scijava.util.AbstractPrimitiveArray<float[],Float>
org.scijava.util.FloatArray
- All Implemented Interfaces:
- Iterable<Float>, Collection<Float>, List<Float>, PrimitiveArray<float[],Float>, Sizable
public class FloatArray
- extends AbstractPrimitiveArray<float[],Float>
An extensible array of float
elements.
- Author:
- Johannes Schindelin, Curtis Rueden
Constructor Summary |
FloatArray()
Constructs an extensible array of floats, backed by a fixed-size array. |
FloatArray(float[] array)
Constructs an extensible array of floats, backed by the given fixed-size
array. |
FloatArray(int size)
Constructs an extensible array of floats, 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 |
FloatArray
public FloatArray()
- Constructs an extensible array of floats, backed by a fixed-size array.
FloatArray
public FloatArray(int size)
- Constructs an extensible array of floats, backed by a fixed-size array.
- Parameters:
size
- the initial size
FloatArray
public FloatArray(float[] array)
- Constructs an extensible array of floats, backed by the given fixed-size
array.
- Parameters:
array
- the array to wrap
addValue
public void addValue(float value)
removeValue
public boolean removeValue(float value)
getValue
public float getValue(int index)
setValue
public float setValue(int index,
float value)
addValue
public void addValue(int index,
float value)
indexOf
public int indexOf(float value)
lastIndexOf
public int lastIndexOf(float value)
contains
public boolean contains(float value)
getArray
public float[] getArray()
- Description copied from interface:
PrimitiveArray
- Gets the fixed-size array backing this instance.
- Returns:
- the backing array
setArray
public void setArray(float[] array)
- Description copied from interface:
PrimitiveArray
- Sets the fixed-size array backing this instance.
- Parameters:
array
- the new backing array
get
public Float get(int index)
- Specified by:
get
in interface List<Float>
- Specified by:
get
in class AbstractList<Float>
set
public Float set(int index,
Float element)
- Specified by:
set
in interface List<Float>
- Specified by:
set
in class AbstractPrimitiveArray<float[],Float>
add
public void add(int index,
Float element)
- Specified by:
add
in interface List<Float>
- Specified by:
add
in class AbstractPrimitiveArray<float[],Float>
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interface List<Float>
- Overrides:
indexOf
in class AbstractList<Float>
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interface List<Float>
- Overrides:
lastIndexOf
in class AbstractList<Float>
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<Float>
- Specified by:
contains
in interface List<Float>
- Overrides:
contains
in class AbstractCollection<Float>
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection<Float>
- Specified by:
remove
in interface List<Float>
- Overrides:
remove
in class AbstractCollection<Float>
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interface Collection<Float>
- Specified by:
containsAll
in interface List<Float>
- Overrides:
containsAll
in class AbstractCollection<Float>
addAll
public boolean addAll(int index,
Collection<? extends Float> c)
- Specified by:
addAll
in interface List<Float>
- Overrides:
addAll
in class AbstractList<Float>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interface Collection<Float>
- Specified by:
removeAll
in interface List<Float>
- Overrides:
removeAll
in class AbstractCollection<Float>
defaultValue
public Float defaultValue()
Copyright © 2009–2014 SciJava. All rights reserved.