Class BooleanList

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

public class BooleanList extends Object implements Iterable<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 Details

    • BooleanList

      public BooleanList()
      Constructor.

      This creates an empty list.

    • BooleanList

      public BooleanList(Collection<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.
  • Method Details

    • clear

      public void clear()
      Clears the list.

    • iterator

      public BooleanListIterator iterator()
      Gets a new BooleanListIterator.

      Specified by:
      iterator in interface Iterable<Boolean>
      Returns:
      BooleanListIterator instance.
    • add

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

      Parameters:
      value - [in] Boolean.
    • count

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

      Returns:
      Number of elements in the list.