package bitmap

import "github.com/Azure/go-amqp/internal/bitmap"

Index

Types

type Bitmap

type Bitmap struct {
	// contains filtered or unexported fields
}

bitmap is a lazily initialized bitmap

func New

func New(max uint32) *Bitmap

func (*Bitmap) Add

func (b *Bitmap) Add(n uint32)

add sets n in the bitmap.

bits will be expanded as needed.

If n is greater than max, the call has no effect.

func (*Bitmap) Next

func (b *Bitmap) Next() (uint32, bool)

next sets and returns the lowest unset bit in the bitmap.

bits will be expanded if necessary.

If there are no unset bits below max, the second return value will be false.

func (*Bitmap) Remove

func (b *Bitmap) Remove(n uint32)

remove clears n from the bitmap.

If n is not set or greater than max the call has not effect.

Source Files

bitmap.go

Version
v1.4.0 (latest)
Published
Feb 19, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
5 days ago

Tools for package owners.