Documentation
¶
Index ¶
- type List
- type SafeList
- type SuperMap
- func (m *SuperMap[K, V]) Add(key K, value V)
- func (m *SuperMap[K, V]) Clear()
- func (m *SuperMap[K, V]) Contains(key K) bool
- func (m *SuperMap[K, V]) Equal(other *SuperMap[K, V]) bool
- func (m *SuperMap[K, V]) Filter(fn func(key K, value V) bool) *SuperMap[K, V]
- func (m *SuperMap[K, V]) Foreach(fn func(key K, value V))
- func (m *SuperMap[K, V]) Get(key K) V
- func (m *SuperMap[K, V]) IsEmpty() bool
- func (m *SuperMap[K, V]) Keys() []K
- func (m *SuperMap[K, V]) Remove(key K)
- func (m *SuperMap[K, V]) Size() int
- func (m *SuperMap[K, V]) Update(other *SuperMap[K, V]) *SuperMap[K, V]
- func (m *SuperMap[K, V]) Values() []V
- type TTLMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
List 是一个泛型实现的列表,但并非协程安全的 如需协程安全,请使用SafeList
func (*List[T]) Difference ¶
Difference 取差集,返回一个新的列表,其中元素是l中存在,但other中不存在的元素
type SafeList ¶
type SafeList[T any] struct { // contains filtered or unexported fields }
SafeList 是一个泛型实现的列表,是协程安全的
func NewSafeList ¶
func (*SafeList[T]) Difference ¶
Difference 取差集,返回一个新的列表,其中元素l中存在,但other中不存在的元素
type SuperMap ¶
func (*SuperMap[K, V]) Foreach ¶ added in v1.1.1
func (m *SuperMap[K, V]) Foreach(fn func(key K, value V))
ForEach 遍历列表
Click to show internal directories.
Click to hide internal directories.