|
Scala Library Documentation
|
|
scala/collection/BitSet.scala]
abstract
class
BitSet
extends Set[Int]
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.
| Method Summary | |
protected abstract def
|
arr : Array[Int] |
abstract def
|
capacity : Int |
def
|
contains (i : Int) : Boolean |
final def
|
elements
: Iterator[Int]
returns an iterator over the truth values of all bits
|
override def
|
equals
(other : Any) : Boolean
Checks if two bitsets are structurally identical.
Uses accelerated (32 x faster) check if the other set is a BitSet
|
override def
|
hashCode
: Int
hashcode for this set
|
protected final def
|
mask (n : Int) : Int |
protected final def
|
memsize (n : Int) : Int |
protected final def
|
nbits (n : Int) : Int |
protected final def
|
offset (n : Int) : Int |
abstract def
|
size
: Int
number of bits in this bitset
|
protected override def
|
stringPrefix
: String
Defines the prefix of this object's
toString representation. |
override def
|
subsetOf
(other : Set[Int]) : Boolean
Checks if this set is a subset of set
that.
Uses accelerated (32 x faster) check if the other set is a BitSet |
override def
|
toArray [B >: Int] : Array[B] |
def
|
underlying : Array[Int] |
| Methods inherited from Set | |
| apply, isEmpty |
| Methods inherited from Collection | |
| toString |
| Methods inherited from Iterable | |
| concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, projection, hasDefiniteSize |
| Methods inherited from Function1 | |
| compose, andThen |
| Methods inherited from AnyRef | |
| getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
abstract
def
size : Int
i - ...true if bit i is set.abstract
def
capacity : Int
other - ...true, iff both bitsets contain the same elements.override
def
hashCode : Int
that.
Uses accelerated (32 x faster) check if the other set is a BitSetother - another set.true, iff the other set is a superset of this set.n - the number of bits to be stored.Int cells needed to store n bits.n - ...n words.n - ...n - ...override
def
toArray[B >: Int] : Array[B]
underlying to get previous toArray behavior.protected override
def
stringPrefix : String
toString representation.|
Scala Library Documentation
|
|