linkedlist

package
v0.0.0-...-f7aafea Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCapacity

func WithCapacity[K cmp.Ordered, V any](nBucket uint64) util.Option[Map[K, V]]

Types

type LinkedList

type LinkedList[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K cmp.Ordered, V any]() *LinkedList[K, V]

func (*LinkedList[K, V]) Get

func (l *LinkedList[K, V]) Get(k K) *atomic.Pointer[V]

func (*LinkedList[K, V]) Insert

func (l *LinkedList[K, V]) Insert(k K, v V)

func (*LinkedList[K, V]) Remove

func (l *LinkedList[K, V]) Remove(k K) bool

type Map

type Map[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K cmp.Ordered, V any](opts ...util.Option[Map[K, V]]) *Map[K, V]

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(k K) (*V, bool)

func (*Map[K, V]) Insert

func (m *Map[K, V]) Insert(k K, v V)

func (*Map[K, V]) IsEmpty

func (m *Map[K, V]) IsEmpty() bool

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() uint64

func (*Map[K, V]) Remove

func (m *Map[K, V]) Remove(k K) bool

type Node

type Node[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package thread_unsafe * MIT License
Package thread_unsafe * MIT License

Jump to

Keyboard shortcuts

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