in scala.collection
class BitSet

abstract class BitSet
extends java.lang.Object
with (scala.Int) => scala.Boolean
with scala.collection.Set[scala.Int]
with scala.ScalaObject

The class BitSet provides the interface for a space-efficient implementation of dense integer sets represented as bits in array of integers. Bit indices are between 0..(capacity-1) inclusive.

Author:
Burak Emir, Stephane Micheloud, Nikolay Mihaylov
Version:
1.1
Direct known subclasses:
BitSet, BitSet

Constructor Summary
def this



Def Summary
abstract protected def arr : scala.Array[scala.Int]

abstract def capacity : scala.Int

def contains (i: scala.Int) : scala.Boolean

final def elements : scala.Iterator[scala.Int]
returns an iterator over the truth values of all bits
override def equals (that: scala.Any) : scala.Boolean
Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet
final protected def mask (n: scala.Int) : scala.Int

final protected def memsize (n: scala.Int) : scala.Int

final protected def nbits (n: scala.Int) : scala.Int

final protected def offset (n: scala.Int) : scala.Int

abstract def size : scala.Int
number of bits in this bitset
override def subsetOf (that: scala.collection.Set[scala.Int]) : scala.Boolean
Checks if this set is a subset of set that. Uses accelerated (32 x faster) check if the other set is a BitSet
def toArray : scala.Array[scala.Int]



Constructor Detail
def this

Def Detail
abstract protected def arr : scala.Array[scala.Int]

abstract def capacity : scala.Int

def contains (i: scala.Int): scala.Boolean
Returns:
true if bit i is set

final def elements : scala.Iterator[scala.Int]
returns an iterator over the truth values of all bits

override def equals (that: scala.Any): scala.Boolean
Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet
Returns:
true, iff both bitsets contain the same elements.

final protected def mask (n: scala.Int): scala.Int
Returns:
a mask with 1 at the position of the bit

final protected def memsize (n: scala.Int): scala.Int
Returns:
the number of Int cells needed to store n bits

final protected def nbits (n: scala.Int): scala.Int
Returns:
the number of bits represented by n words

final protected def offset (n: scala.Int): scala.Int
Returns:
the position in the array where the bit resides

abstract def size : scala.Int
number of bits in this bitset

override def subsetOf (that: scala.collection.Set[scala.Int]): scala.Boolean
Checks if this set is a subset of set that. Uses accelerated (32 x faster) check if the other set is a BitSet
Parameters:
that - another set.
Returns:
true, iff the other set is a superset of this set.

def toArray : scala.Array[scala.Int]
Returns:
a copy of the array underlying this bitset