in scala/collection
class BitSet

abstract class BitSet()
extends Object
with ScalaObject
with (Int) => Boolean
Implementing classes or objects:
class BitSet(initSize: Int) in scala/collection/mutable
class BitSet(n: Int, ba: Array[Int], copy: Boolean) in scala/collection/immutable

The class BitSet ...
Author:
Burak Emir, Stephane Micheloud
Version:
1.0

Method Summary
abstract def apply(i: Int): Boolean
     returns true if bit i is set
final def booleanElements: Iterator[Boolean]
     returns an iterator over the truth values of all bits
override def equals(that: Any): Boolean
     Checks if two bitsets are structurally identical.
  def foreach(f: (Int) => Unit): Unit
     applies f to any index which is set to true.
protected def memsize(n: Int): Int
     returns number of Int cells needed to store n bits
abstract def size: Int
     number of bits in this bitset
final def toSet(v: Boolean): TreeSet[Int]
     Returns the subset of [0..size] whose elements are indices of bits set to v.
override def toString(): String
     Returns a string representation of this bitset in hexadecimal form, e.g.

Methods inherited from java/lang/Object-class
clone, eq, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/ScalaObject-class
getScalaType

Method Detail

size

  abstract def size: Int
number of bits in this bitset

apply

  abstract def apply(i: Int): Boolean
returns true if bit i is set

booleanElements

  final def booleanElements: Iterator[Boolean]
returns an iterator over the truth values of all bits

toSet

  final def toSet(v: Boolean): TreeSet[Int]
Returns the subset of [0..size] whose elements are indices of bits set to v.
Parameters:
v -

equals

  override def equals(that: Any): Boolean
Checks if two bitsets are structurally identical.
Returns:
true, iff both bitsets contain the same sequence of elements.

foreach

  def foreach(f: (Int) => Unit): Unit
applies f to any index which is set to true.

toString

  override def toString(): String
Returns a string representation of this bitset in hexadecimal form, e.g. the bitset 001100000001 (12 bits) is represented as "{0, 8, 9}".
Returns:
the string representation for this bitset

memsize

  protected def memsize(n: Int): Int
returns number of Int cells needed to store n bits