public class ShortArray extends AbstractPrimitiveArray<short[],Short>
short
elements.modCount
Constructor and Description |
---|
ShortArray()
Constructs an extensible array of shorts, backed by a fixed-size array.
|
ShortArray(int size)
Constructs an extensible array of shorts, backed by a fixed-size array.
|
ShortArray(short[] array)
Constructs an extensible array of shorts, backed by the given fixed-size
array.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Short element) |
boolean |
addAll(int index,
Collection<? extends Short> c) |
void |
addValue(int index,
short value) |
void |
addValue(short value) |
boolean |
contains(Object o) |
boolean |
contains(short value) |
boolean |
containsAll(Collection<?> c) |
Short |
defaultValue() |
Short |
get(int index) |
short[] |
getArray()
Gets the fixed-size array backing this instance.
|
short |
getValue(int index) |
int |
indexOf(Object o) |
int |
indexOf(short value) |
int |
lastIndexOf(Object o) |
int |
lastIndexOf(short value) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeValue(short value) |
Short |
set(int index,
Short element) |
void |
setArray(short[] array)
Sets the fixed-size array backing this instance.
|
short |
setValue(int index,
short 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 ShortArray()
public ShortArray(int size)
size
- the initial sizepublic ShortArray(short[] array)
array
- the array to wrappublic void addValue(short value)
public boolean removeValue(short value)
public short getValue(int index)
public short setValue(int index, short value)
public void addValue(int index, short value)
public int indexOf(short value)
public int lastIndexOf(short value)
public boolean contains(short value)
public short[] getArray()
PrimitiveArray
public void setArray(short[] array)
PrimitiveArray
array
- the new backing arraypublic Short get(int index)
public void add(int index, Short element)
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<Short>
lastIndexOf
in class AbstractList<Short>
public boolean contains(Object o)
contains
in interface Collection<Short>
contains
in interface List<Short>
contains
in class AbstractCollection<Short>
public boolean remove(Object o)
remove
in interface Collection<Short>
remove
in interface List<Short>
remove
in class AbstractCollection<Short>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<Short>
containsAll
in interface List<Short>
containsAll
in class AbstractCollection<Short>
public boolean addAll(int index, Collection<? extends Short> c)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<Short>
removeAll
in interface List<Short>
removeAll
in class AbstractCollection<Short>
public Short defaultValue()
Copyright © 2015–2022 SciJava. All rights reserved.