public class BooleanList
extends java.lang.Object
implements java.lang.Iterable<java.lang.Boolean>
It stores a Boolean list.
Use BooleanListIterator to access all elements into this collection.
Constructor and Description |
---|
BooleanList()
Constructor.
|
BooleanList(boolean[] list)
Creates a new instance from a boolean array.
|
BooleanList(java.util.Collection<java.lang.Boolean> col)
Creates a new instance from a boolean collection.
|
Modifier and Type | Method and Description |
---|---|
void |
add(boolean value)
Adds a Boolean at the end of the list.
|
void |
clear()
Clears the list.
|
int |
count()
Number of elements in the list.
|
BooleanListIterator |
iterator()
Gets a new BooleanListIterator.
|
public BooleanList()
This creates an empty list.
public BooleanList(java.util.Collection<java.lang.Boolean> col)
col
- Collection to initialize the instance.public BooleanList(boolean[] list)
list
- Boolean array to initialize the instance.public void clear()
public BooleanListIterator iterator()
iterator
in interface java.lang.Iterable<java.lang.Boolean>
public void add(boolean value)
value
- [in] Boolean.public int count()