net.sf.molae.pipe.hash
Class ListBasedBitSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
net.sf.molae.pipe.hash.SetBasedBitSet<E>
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.
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 |
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
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.