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