public class IntArray extends AbstractPrimitiveArray<int[],Integer>
int
elements.modCount
Constructor and Description |
---|
IntArray()
Constructs an extensible array of ints, backed by a fixed-size array.
|
IntArray(int size)
Constructs an extensible array of ints, backed by a fixed-size array.
|
IntArray(int[] array)
Constructs an extensible array of ints, backed by the given fixed-size
array.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Integer element) |
boolean |
addAll(int index,
Collection<? extends Integer> c) |
void |
addValue(int value) |
void |
addValue(int index,
int value) |
boolean |
contains(int value) |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Integer |
defaultValue() |
Integer |
get(int index) |
int[] |
getArray()
Gets the fixed-size array backing this instance.
|
int |
getValue(int index) |
int |
indexOf(int value) |
int |
indexOf(Object o) |
int |
lastIndexOf(int value) |
int |
lastIndexOf(Object o) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeValue(int value) |
Integer |
set(int index,
Integer element) |
void |
setArray(int[] array)
Sets the fixed-size array backing this instance.
|
int |
setValue(int index,
int value) |
capacity, checkBounds, clear, copyArray, delete, ensureCapacity, getMaximumGrowth, insert, remove, setMaximumGrowth, setSize, size
add, equals, hashCode, iterator, listIterator, listIterator, removeRange, subList
addAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, equals, hashCode, isEmpty, iterator, listIterator, listIterator, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public IntArray()
public IntArray(int size)
size
- the initial sizepublic IntArray(int[] array)
array
- the array to wrappublic void addValue(int value)
public boolean removeValue(int value)
public int getValue(int index)
public int setValue(int index, int value)
public void addValue(int index, int value)
public int indexOf(int value)
public int lastIndexOf(int value)
public boolean contains(int value)
public int[] getArray()
PrimitiveArray
public void setArray(int[] array)
PrimitiveArray
array
- the new backing arraypublic Integer get(int index)
public void add(int index, Integer element)
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<Integer>
lastIndexOf
in class AbstractList<Integer>
public boolean contains(Object o)
contains
in interface Collection<Integer>
contains
in interface List<Integer>
contains
in class AbstractCollection<Integer>
public boolean remove(Object o)
remove
in interface Collection<Integer>
remove
in interface List<Integer>
remove
in class AbstractCollection<Integer>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<Integer>
containsAll
in interface List<Integer>
containsAll
in class AbstractCollection<Integer>
public boolean addAll(int index, Collection<? extends Integer> c)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<Integer>
removeAll
in interface List<Integer>
removeAll
in class AbstractCollection<Integer>
public Integer defaultValue()
Copyright © 2015–2022 SciJava. All rights reserved.