container

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayBlockDeque

type ArrayBlockDeque[T any] struct {
	// contains filtered or unexported fields
}

func NewArrayBlockDeque

func NewArrayBlockDeque[T any](num int) *ArrayBlockDeque[T]

func (*ArrayBlockDeque[T]) Put

func (a *ArrayBlockDeque[T]) Put(value T)

func (*ArrayBlockDeque[T]) Take

func (a *ArrayBlockDeque[T]) Take() T

type ArrayDeque

type ArrayDeque[T any] struct {
	// contains filtered or unexported fields
}

func NewArrayDeque

func NewArrayDeque[T any](num int) *ArrayDeque[T]

func (*ArrayDeque[T]) AddFirst

func (d *ArrayDeque[T]) AddFirst(value T)

func (*ArrayDeque[T]) AddLast

func (d *ArrayDeque[T]) AddLast(value T)

func (*ArrayDeque[T]) GetFirst

func (d *ArrayDeque[T]) GetFirst() T

func (*ArrayDeque[T]) GetLast

func (d *ArrayDeque[T]) GetLast() T

func (*ArrayDeque[T]) RemoveFirst

func (d *ArrayDeque[T]) RemoveFirst() T

func (*ArrayDeque[T]) RemoveLast

func (d *ArrayDeque[T]) RemoveLast() T

func (*ArrayDeque[T]) Size

func (d *ArrayDeque[T]) Size() int

func (*ArrayDeque[T]) String

func (d *ArrayDeque[T]) String() string

type BitArray

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

func NewBitArray

func NewBitArray() *BitArray

func (*BitArray) BitCount

func (b *BitArray) BitCount() int64

func (*BitArray) GetBit

func (b *BitArray) GetBit(offset int) int

func (*BitArray) SetBit

func (b *BitArray) SetBit(offset, val int) int

type BitMap

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

func NewBitMap

func NewBitMap() *BitMap

func (*BitMap) BitCount

func (b *BitMap) BitCount(key string) int64

func (*BitMap) GetBit

func (b *BitMap) GetBit(key string, offset int) int

func (*BitMap) SetBit

func (b *BitMap) SetBit(key string, offset, value int) int

type CopyOnWriteArray

type CopyOnWriteArray[T any] struct {
	// contains filtered or unexported fields
}

func NewCopyOnWrieArray

func NewCopyOnWrieArray[T any]() CopyOnWriteArray[T]

func (*CopyOnWriteArray[T]) Add

func (c *CopyOnWriteArray[T]) Add(item T)

func (*CopyOnWriteArray[T]) Get

func (c *CopyOnWriteArray[T]) Get(index int) T

func (*CopyOnWriteArray[T]) Remove

func (c *CopyOnWriteArray[T]) Remove(index int)

func (*CopyOnWriteArray[T]) Set

func (c *CopyOnWriteArray[T]) Set(index int, item T)

type HashMap

type HashMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewHashMap

func NewHashMap[K comparable, V any](i ...int) HashMap[K, V]

func (*HashMap[K, V]) Clear

func (h *HashMap[K, V]) Clear()

func (*HashMap[K, V]) ClearSaveCapatiy

func (h *HashMap[K, V]) ClearSaveCapatiy()

func (*HashMap[K, V]) Contains

func (h *HashMap[K, V]) Contains(key K) bool

func (*HashMap[K, V]) Delete

func (h *HashMap[K, V]) Delete(key K)

func (*HashMap[K, V]) ForEach

func (h *HashMap[K, V]) ForEach(f func(K, V))

func (*HashMap[K, V]) Get

func (h *HashMap[K, V]) Get(key K) (V, bool)

func (*HashMap[K, V]) IsEmpty

func (h *HashMap[K, V]) IsEmpty() bool

func (*HashMap[K, V]) Keys

func (h *HashMap[K, V]) Keys() []K

func (*HashMap[K, V]) Put

func (h *HashMap[K, V]) Put(key K, value V)

func (*HashMap[K, V]) Size

func (h *HashMap[K, V]) Size() int

type HashSet

type HashSet[T comparable] struct {
	// contains filtered or unexported fields
}

func NewHashSet

func NewHashSet[T comparable](i ...int) *HashSet[T]

func (*HashSet[T]) Add

func (h *HashSet[T]) Add(t T)

func (*HashSet[T]) Clear

func (h *HashSet[T]) Clear()

func (*HashSet[T]) Contains

func (h *HashSet[T]) Contains(t T) bool

func (*HashSet[T]) ForEach

func (h *HashSet[T]) ForEach(f func(T))

func (*HashSet[T]) IsEmpty

func (h *HashSet[T]) IsEmpty() bool

func (*HashSet[T]) Len

func (h *HashSet[T]) Len() int

func (*HashSet[T]) Remove

func (h *HashSet[T]) Remove(t T)

func (*HashSet[T]) ToSlice

func (h *HashSet[T]) ToSlice() []T

type LinkedHashMap

type LinkedHashMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewLinkedHashMap

func NewLinkedHashMap[K comparable, V any]() LinkedHashMap[K, V]

func (*LinkedHashMap[K, V]) Clear

func (l *LinkedHashMap[K, V]) Clear()

func (*LinkedHashMap[K, V]) Contains

func (l *LinkedHashMap[K, V]) Contains(key K) bool

func (*LinkedHashMap[K, V]) Delete

func (l *LinkedHashMap[K, V]) Delete(key K)

func (*LinkedHashMap[K, V]) ForEach

func (l *LinkedHashMap[K, V]) ForEach(f func(key K, value V))

func (*LinkedHashMap[K, V]) Get

func (l *LinkedHashMap[K, V]) Get(key K) (V, bool)

func (*LinkedHashMap[K, V]) IsEmpty

func (l *LinkedHashMap[K, V]) IsEmpty() bool

func (*LinkedHashMap[K, V]) Keys

func (l *LinkedHashMap[K, V]) Keys() []K

func (*LinkedHashMap[K, V]) Put

func (l *LinkedHashMap[K, V]) Put(key K, value V)

func (*LinkedHashMap[K, V]) Size

func (l *LinkedHashMap[K, V]) Size() int

Jump to

Keyboard shortcuts

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