net.sf.molae.pipe.hash
Class ListBasedBitSet<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by net.sf.molae.pipe.hash.SetBasedBitSet<E>
              extended by net.sf.molae.pipe.hash.ListBasedBitSet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class ListBasedBitSet<E>
extends SetBasedBitSet<E>

A set based on a list and a bit set that determines which elements are contained in the set.


Constructor Summary
ListBasedBitSet(List<E> base)
          Constructs a ListBasedBitSet object.
 
Method Summary
 Iterator<E> iterator()
          Returns an iterator over the elements contained in this collection.
 
Methods inherited from class net.sf.molae.pipe.hash.SetBasedBitSet
add, addAll, clear, contains, containsAll, getBase, getMask, isEmpty, remove, removeAll, retainAll, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
toArray, toArray
 

Constructor Detail

ListBasedBitSet

public ListBasedBitSet(List<E> base)
Constructs a ListBasedBitSet object.

Parameters:
base - the base set of which this set is a subset. Each element must be stored at the position of its hash code.
See Also:
HashList
Method Detail

iterator

public Iterator<E> iterator()
Returns an iterator over the elements contained in this collection. This implementation returns an iterator that iterates over the bits of the bitmap.

Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface Set<E>
Overrides:
iterator in class SetBasedBitSet<E>
Returns:
an iterator over the elements contained in this collection.