com.sparsity.sparksee.gdb
Class BooleanList

java.lang.Object
  extended by com.sparsity.sparksee.gdb.BooleanList
All Implemented Interfaces:
java.lang.Iterable<java.lang.Boolean>

public class BooleanList
extends java.lang.Object
implements java.lang.Iterable<java.lang.Boolean>

Boolean list.

It stores a Boolean list.

Use BooleanListIterator to access all elements into this collection.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Constructor Summary
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.
 
Method Summary
 void add(boolean b)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanList

public BooleanList(java.util.Collection<java.lang.Boolean> col)
Creates a new instance from a boolean collection.

Parameters:
col - Collection to initialize the instance.

BooleanList

public BooleanList(boolean[] list)
Creates a new instance from a boolean array.

Parameters:
list - Boolean array to initialize the instance.

BooleanList

public BooleanList()
Constructor.

This creates an empty list.

Method Detail

clear

public void clear()
Clears the list.


add

public void add(boolean b)
Adds a Boolean at the end of the list.

Parameters:
b - [in] Boolean.

iterator

public BooleanListIterator iterator()
Gets a new BooleanListIterator.

Specified by:
iterator in interface java.lang.Iterable<java.lang.Boolean>
Returns:
BooleanListIterator instance.

count

public int count()
Number of elements in the list.

Returns:
Number of elements in the list.