Scala Library
|
|
scala/collection/mutable/BitSet.scala
]
class
BitSet(initSize : Int)
extends
BitSet with
Set[Int]BitSet
implements mutable, resizable Bit setsinitSize: -
initial size in bitsAdditional Constructor Summary | |
def
|
this
: BitSet
default constructor, initial size of 512 bits.
|
Value Summary | |
protected var
|
arr : Array[Int] |
var
|
capacity : Int |
var
|
size
: Int
number of bits in this bitset
|
Method Summary | |
def
|
+=
(i : Int) : Unit
Sets
i-th bit to true.
No restriction on i |
def
|
-=
(i : Int) : Unit
Clears the
i -th bit. |
override def
|
clear
: Unit
Clears all bits of the set.
|
override def
|
clone
: BitSet
Return a clone of this set.
|
def
|
ensureCapacity
(n : Int) : Unit
Ensures that this bitset can store at least
n bits. |
def
|
toImmutable : BitSet |
Methods inherited from Set | |
update, +=, ++=, ++=, +, +, ++, ++, incl, -=, --=, --=, -, -, --, --, excl, intersect, retain, <<, readOnly |
Methods inherited from BitSet | |
contains, elements, equals, hashCode, subsetOf, memsize, nbits, offset, mask, underlying, stringPrefix |
Methods inherited from Set | |
apply, isEmpty, *, **, toArray |
Methods inherited from Collection | |
toString |
Methods inherited from Iterable | |
concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, projection, hasDefiniteSize |
Methods inherited from Function1 | |
compose, andThen |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Additional Constructor Details |
Value Details |
Method Details |
n
bits.n -
...i-th
bit to true.
No restriction on i
i
-th bit.i -
the i
-th element of the bit set.override
def
clear : Unit
def
toImmutable : BitSet
override
def
clone : BitSet
Scala Library
|
|