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