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