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