scala.collection.generic

trait BitSetTemplate

[source: scala/collection/generic/BitSetTemplate.scala]

trait BitSetTemplate[+This <: BitSetTemplate[This] with Set[Int]]
extends SetTemplate[Int, This]
common base class for mutable and immutable bit sets
Direct Known Subclasses:
BitSet, BitSet, BitSet

Method Summary
def & (other : BitSet) : This
A new bitset which is the logical and of this set and the given argument set.
def &~ (other : BitSet) : This
A new bitset which is the logical and-not of this set and the given argument set.
def ^ (other : BitSet) : This
A new bitset which is the logical exclusive or of this set and the given argument set.
override def addString (sb : StringBuilder, start : java.lang.String, sep : java.lang.String, end : java.lang.String) : StringBuilder
Add bitset elements as numbers to string buffer
def contains (elem : Int) : Boolean
Does the set contain the given element?
abstract def empty : This
override def foreach [B](f : (Int) => B) : Unit
Apply a function f to all elements of this traversable object.
protected abstract def fromArray (elems : Array[Long]) : This
Create a new set of this kind from an array of longs
def iterator : Iterator[Int]
Creates a new iterator over all elements contained in this iterable object.
protected abstract def nwords : Int
The number of words (each with 64 bits) making up the set
override def size : Int
The number of elements in the bitset.
def subSet (other : BitSet) : Boolean
Is the set a subset of the given bitset
protected abstract def word (idx : Int) : Long
The words at index `idx', or 0L if outside the range of the set
def | (other : BitSet) : This
A new bitset which is the logical or of this set and the given argument set.
Methods inherited from SetTemplate
+ (abstract), - (abstract), newBuilder, isEmpty, apply, intersect, &, **, union, |, diff, &~, subsetOf, equals, stringPrefix, toString
Methods inherited from Subtractable
-, --, --
Methods inherited from Addable
+, ++, ++
Methods inherited from IterableTemplate
elements, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, view, view, first, firstOption, toSeq, projection
Methods inherited from TraversableTemplate
thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSequence, toSet, mkString, mkString, mkString, addString, addString
Methods inherited from AnyRef
getClass, hashCode, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def empty : This
Overrides
SetTemplate.empty

protected abstract def nwords : Int
The number of words (each with 64 bits) making up the set

protected abstract def word(idx : Int) : Long
The words at index `idx', or 0L if outside the range of the set
Precondition
idx >= 0

protected abstract def fromArray(elems : Array[Long]) : This
Create a new set of this kind from an array of longs

override def size : Int
The number of elements in the bitset.

def iterator : Iterator[Int]
Creates a new iterator over all elements contained in this iterable object.
Returns
the new iterator

override def foreach[B](f : (Int) => B) : Unit
Apply a function f to all elements of this traversable object.
Parameters
f - A function that is applied for its side-effect to every element. The result (of arbitrary type U) of function `f` is discarded.
Notes
This method underlies the implementation of most other bulk operations. Implementing `foreach` with `iterator` is often suboptimal. So `foreach` should be overridden in concrete collection classes if a more efficient implementation is available.

def |(other : BitSet) : This
A new bitset which is the logical or of this set and the given argument set.

def &(other : BitSet) : This
A new bitset which is the logical and of this set and the given argument set.

def &~(other : BitSet) : This
A new bitset which is the logical and-not of this set and the given argument set.

def ^(other : BitSet) : This
A new bitset which is the logical exclusive or of this set and the given argument set.

def contains(elem : Int) : Boolean
Does the set contain the given element?
Overrides
SetTemplate.contains

def subSet(other : BitSet) : Boolean
Is the set a subset of the given bitset

override def addString(sb : StringBuilder, start : java.lang.String, sep : java.lang.String, end : java.lang.String) : StringBuilder
Add bitset elements as numbers to string buffer