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