scala.collection

trait BitSetLike

[source: scala/collection/BitSetLike.scala]

trait BitSetLike[+This <: BitSetLike[This] with Set[Int]]
extends SetLike[Int, This]
common base class for mutable and immutable bit sets
Since
2.8
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 iterable 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.
override def stringPrefix : java.lang.String
Defines the prefix of this object's toString representation.
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 SetLike
+ (abstract), - (abstract), newBuilder, isEmpty, apply, intersect, &, **, union, |, diff, &~, subsetOf, toString, hashCode, equals
Methods inherited from Subtractable
-, --, --
Methods inherited from Addable
+, ++, ++
Methods inherited from IterableLike
thisCollection, toCollection, elements, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection
Methods inherited from TraversableLike
repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, withFilter
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 empty : This
Overrides
SetLike.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 iterable 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
SetLike.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

override def stringPrefix : java.lang.String
Defines the prefix of this object's toString representation.
Overrides
SetLike.stringPrefix