in scala.collection
class BitSet

`abstract class` BitSet
  `extends` java.lang.Object
  `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
Author:
  Martin Odersky
Version:
  2.0 01/01/2007

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 (other: scala.Any) : scala.Boolean Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet
`override` | `def` hashCode : scala.Int
`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 (other: 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]

Def inherited from scala.collection.Set[scala.Int]
apply , contains, equals, hashCode, isEmpty, size, subsetOf, toString

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

Parameters:
  `i -` ...
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 (other: scala.Any): scala.Boolean

  Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet

Parameters:
  `other -` ...
Returns:
  `true`, iff both bitsets contain the same elements.

`override def` hashCode : scala.Int

`final protected def` mask (n: scala.Int): scala.Int

Parameters:
  `n -` ...
Returns:
  a mask with 1 at the position of the bit.

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

Parameters:
  `n -` the number of bits to be stored.
Returns:
  the number of `Int` cells needed to store `n` bits.

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

Parameters:
  `n -` ...
Returns:
  the number of bits represented by `n` words.

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

Parameters:
  `n -` ...
Returns:
  the position in the array where the bit resides.

`abstract def` size : scala.Int

  number of bits in this bitset

`override def` subsetOf (other: 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:
  `other -` 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