Documentation ¶
Index ¶
- type SafeMap
- func (m *SafeMap[K, V]) Clear()
- func (m *SafeMap[K, V]) Delete(k K)
- func (m *SafeMap[K, V]) Elements() []*SafeMapElement[K, V]
- func (m *SafeMap[K, V]) Get(k K) (V, bool)
- func (m *SafeMap[K, V]) Has(k K) bool
- func (m *SafeMap[K, V]) Keys() []K
- func (m *SafeMap[K, V]) Len() int
- func (m *SafeMap[K, V]) Map() map[K]V
- func (m *SafeMap[K, V]) MustGet(k K) V
- func (m *SafeMap[K, V]) Range(f func(k K, v V) bool)
- func (m *SafeMap[K, V]) Set(k K, v V)
- func (m *SafeMap[K, V]) SetIfAbsent(k K, v V) (V, bool)
- func (m *SafeMap[K, V]) SortElement(f SafeMapSorterFunc[K, V]) []*SafeMapElement[K, V]
- func (m *SafeMap[K, V]) SortKey(f SafeMapSorterFunc[K, V]) []K
- func (m *SafeMap[K, V]) SortValue(f SafeMapSorterFunc[K, V]) []V
- func (m *SafeMap[K, V]) Values() []V
- type SafeMapElement
- type SafeMapSorterFunc
- type SliceFinder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeMap ¶
type SafeMap[K comparable, V any] struct { Data sync.Map }
func (*SafeMap[K, V]) Elements ¶
func (m *SafeMap[K, V]) Elements() []*SafeMapElement[K, V]
func (*SafeMap[K, V]) SetIfAbsent ¶
func (*SafeMap[K, V]) SortElement ¶
func (m *SafeMap[K, V]) SortElement(f SafeMapSorterFunc[K, V]) []*SafeMapElement[K, V]
func (*SafeMap[K, V]) SortKey ¶
func (m *SafeMap[K, V]) SortKey(f SafeMapSorterFunc[K, V]) []K
func (*SafeMap[K, V]) SortValue ¶
func (m *SafeMap[K, V]) SortValue(f SafeMapSorterFunc[K, V]) []V
type SafeMapElement ¶
type SafeMapElement[K comparable, V any] struct { Key K Value V }
type SafeMapSorterFunc ¶
type SafeMapSorterFunc[K comparable, V any] func(a *SafeMapElement[K, V], b *SafeMapElement[K, V]) bool
type SliceFinder ¶
type SliceFinder[T comparable] struct { Data map[T]bool }
func NewSliceFinder ¶
func NewSliceFinder[T comparable](s []T) *SliceFinder[T]
func (*SliceFinder[T]) Add ¶
func (f *SliceFinder[T]) Add(v []T)
func (*SliceFinder[T]) Clear ¶
func (f *SliceFinder[T]) Clear()
func (*SliceFinder[T]) Find ¶
func (f *SliceFinder[T]) Find(v T) bool
func (*SliceFinder[T]) GetSlice ¶
func (f *SliceFinder[T]) GetSlice() []T
func (*SliceFinder[T]) Len ¶
func (f *SliceFinder[T]) Len() int
Click to show internal directories.
Click to hide internal directories.