xcontainer

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: Unlicense Imports: 2 Imported by: 0

README

xcontainer

xcontainer is a package of data structures that are missing from the standard library.

Running Tests

The test suite can be run with the following make command:

make test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentSet

type ConcurrentSet[O constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func NewConcurrentSet

func NewConcurrentSet[O constraints.Ordered](vals ...O) ConcurrentSet[O]

func (*ConcurrentSet[O]) Add

func (c *ConcurrentSet[O]) Add(val O)

func (*ConcurrentSet[O]) Contains

func (c *ConcurrentSet[O]) Contains(val O) bool

func (*ConcurrentSet[O]) Len

func (c *ConcurrentSet[O]) Len() int

func (*ConcurrentSet[O]) Remove

func (c *ConcurrentSet[O]) Remove(val O)

type Set

type Set[O constraints.Ordered] interface {
	Add(val O)
	Remove(val O)
	Contains(val O) bool
	Len() int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL