Class

com.stripe.bonsai

IndexedBitSetBuilder

Related Doc: package bonsai

Permalink

class IndexedBitSetBuilder extends Builder[Boolean, IndexedBitSet]

This class is used to construct an IndexedBitSet.

Unlike IndexedBitSet it is mutable. It's internal state consists of the "in-progress" bitset.

It expects to consume a sequence of true/false values (using the += method). The first value corresponds to 0, the second 1, the third 2, and so on.

For example:

val b = IndexedBitSet.newBuilder b += false b += true b += false b.result() // produces IndexedBitSet(010)

If you need to reuse a builder, you must call .clear() first to reset its internal state.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IndexedBitSetBuilder
  2. Builder
  3. Growable
  4. Clearable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IndexedBitSetBuilder()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++=(xs: TraversableOnce[Boolean]): IndexedBitSetBuilder.this.type

    Permalink
    Definition Classes
    Growable
  4. def +=(x: Boolean): IndexedBitSetBuilder.this.type

    Permalink

    Append another value to to the bitset.

    Append another value to to the bitset.

    This method modifies the builder's internal state. It corresponds to the membership status (true/false) of the "next" integer value. The caller is expected to be independently tracking this information.

    Definition Classes
    IndexedBitSetBuilder → Builder → Growable
  5. def +=(elem1: Boolean, elem2: Boolean, elems: Boolean*): IndexedBitSetBuilder.this.type

    Permalink
    Definition Classes
    Growable
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val bits: ArrayBuilder[Int]

    Permalink
  9. def clear(): Unit

    Permalink

    Reset the builder's internal state.

    Reset the builder's internal state.

    If you want to reuse a builder which has already been modified with += or .result(), you will need to call this method first.

    Definition Classes
    IndexedBitSetBuilder → Builder → Growable → Clearable
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. var cnt: Int

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. var head: Int

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. var k: Int

    Permalink
  20. val level1: ArrayBuilder[Int]

    Permalink
  21. val level2: ArrayBuilder[Short]

    Permalink
  22. var m: Short

    Permalink
  23. def mapResult[NewTo](f: (IndexedBitSet) ⇒ NewTo): Builder[Boolean, NewTo]

    Permalink
    Definition Classes
    Builder
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def result(): IndexedBitSet

    Permalink

    Finalize the builder, and return a bitset.

    Finalize the builder, and return a bitset.

    This method modifies the internal state. Thus, it is NOT safe to call this multiple times to construct the "same" bitset.

    After calling this method, the only safe method to call is .clear().

    Definition Classes
    IndexedBitSetBuilder → Builder
  28. def sizeHint(coll: TraversableLike[_, _], delta: Int): Unit

    Permalink
    Definition Classes
    Builder
  29. def sizeHint(coll: TraversableLike[_, _]): Unit

    Permalink
    Definition Classes
    Builder
  30. def sizeHint(size: Int): Unit

    Permalink
    Definition Classes
    Builder
  31. def sizeHintBounded(size: Int, boundingColl: TraversableLike[_, _]): Unit

    Permalink
    Definition Classes
    Builder
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Builder[Boolean, IndexedBitSet]

Inherited from Growable[Boolean]

Inherited from Clearable

Inherited from AnyRef

Inherited from Any

Ungrouped