Documentation ¶
Index ¶
- type ConcurrentDictionary
- func (d *ConcurrentDictionary[K, V]) Add(key K, value V) bool
- func (d *ConcurrentDictionary[K, V]) Contains(key K) bool
- func (d *ConcurrentDictionary[K, V]) Count() int
- func (d *ConcurrentDictionary[K, V]) Get(key K) (V, bool)
- func (d *ConcurrentDictionary[K, V]) Iterator() map[K]V
- func (d *ConcurrentDictionary[K, V]) Keys() []K
- func (d *ConcurrentDictionary[K, V]) MarshalJSON() ([]byte, error)
- func (d *ConcurrentDictionary[K, V]) ROper(f func(m map[K]V))
- func (d *ConcurrentDictionary[K, V]) Remove(key K) bool
- func (d *ConcurrentDictionary[K, V]) Set(key K, value V)
- func (d *ConcurrentDictionary[K, V]) String() string
- func (d *ConcurrentDictionary[K, V]) UnmarshalJSON(b []byte) error
- func (d *ConcurrentDictionary[K, V]) Values() []V
- func (d *ConcurrentDictionary[K, V]) WOper(f func(m map[K]V))
- type Dictionary
- func (d *Dictionary[K, V]) Add(key K, value V) bool
- func (d *Dictionary[K, V]) Clone() *Dictionary[K, V]
- func (d *Dictionary[K, V]) CloneToMap() map[K]V
- func (d *Dictionary[K, V]) Contains(key K) bool
- func (d *Dictionary[K, V]) Count() int
- func (d *Dictionary[K, V]) Get(key K) (value V, ok bool)
- func (d *Dictionary[K, V]) Iterator() map[K]V
- func (d *Dictionary[K, V]) Keys() []K
- func (d *Dictionary[K, V]) MarshalJSON() ([]byte, error)
- func (d *Dictionary[K, V]) Remove(key K) bool
- func (d *Dictionary[K, V]) Set(key K, value V)
- func (d *Dictionary[K, V]) String() string
- func (d *Dictionary[K, V]) UnmarshalJSON(b []byte) error
- func (d *Dictionary[K, V]) Values() []V
- type IDictionary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentDictionary ¶
type ConcurrentDictionary[K comparable, V any] struct { // contains filtered or unexported fields }
ConcurrentDictionary is a thread-safe dictionary.
func NewConcurrentDictionary ¶
func NewConcurrentDictionary[K comparable, V any]() *ConcurrentDictionary[K, V]
NewConcurrentDictionary creates a new ConcurrentDictionary.
func (*ConcurrentDictionary[K, V]) Add ¶
func (d *ConcurrentDictionary[K, V]) Add(key K, value V) bool
Add adds a new item to the dictionary.
func (*ConcurrentDictionary[K, V]) Contains ¶
func (d *ConcurrentDictionary[K, V]) Contains(key K) bool
func (*ConcurrentDictionary[K, V]) Count ¶
func (d *ConcurrentDictionary[K, V]) Count() int
func (*ConcurrentDictionary[K, V]) Get ¶
func (d *ConcurrentDictionary[K, V]) Get(key K) (V, bool)
func (*ConcurrentDictionary[K, V]) Iterator ¶
func (d *ConcurrentDictionary[K, V]) Iterator() map[K]V
func (*ConcurrentDictionary[K, V]) Keys ¶
func (d *ConcurrentDictionary[K, V]) Keys() []K
func (*ConcurrentDictionary[K, V]) MarshalJSON ¶
func (d *ConcurrentDictionary[K, V]) MarshalJSON() ([]byte, error)
func (*ConcurrentDictionary[K, V]) ROper ¶ added in v0.0.16
func (d *ConcurrentDictionary[K, V]) ROper(f func(m map[K]V))
func (*ConcurrentDictionary[K, V]) Remove ¶
func (d *ConcurrentDictionary[K, V]) Remove(key K) bool
func (*ConcurrentDictionary[K, V]) Set ¶
func (d *ConcurrentDictionary[K, V]) Set(key K, value V)
func (*ConcurrentDictionary[K, V]) String ¶ added in v0.0.16
func (d *ConcurrentDictionary[K, V]) String() string
func (*ConcurrentDictionary[K, V]) UnmarshalJSON ¶
func (d *ConcurrentDictionary[K, V]) UnmarshalJSON(b []byte) error
func (*ConcurrentDictionary[K, V]) Values ¶
func (d *ConcurrentDictionary[K, V]) Values() []V
func (*ConcurrentDictionary[K, V]) WOper ¶ added in v0.0.16
func (d *ConcurrentDictionary[K, V]) WOper(f func(m map[K]V))
type Dictionary ¶
type Dictionary[K comparable, V any] struct { // contains filtered or unexported fields }
func NewDictionary ¶
func NewDictionary[K comparable, V any]() *Dictionary[K, V]
func (*Dictionary[K, V]) Add ¶
func (d *Dictionary[K, V]) Add(key K, value V) bool
func (*Dictionary[K, V]) Clone ¶
func (d *Dictionary[K, V]) Clone() *Dictionary[K, V]
func (*Dictionary[K, V]) CloneToMap ¶
func (d *Dictionary[K, V]) CloneToMap() map[K]V
func (*Dictionary[K, V]) Contains ¶
func (d *Dictionary[K, V]) Contains(key K) bool
func (*Dictionary[K, V]) Count ¶
func (d *Dictionary[K, V]) Count() int
func (*Dictionary[K, V]) Get ¶
func (d *Dictionary[K, V]) Get(key K) (value V, ok bool)
func (*Dictionary[K, V]) Iterator ¶
func (d *Dictionary[K, V]) Iterator() map[K]V
func (*Dictionary[K, V]) Keys ¶
func (d *Dictionary[K, V]) Keys() []K
func (*Dictionary[K, V]) MarshalJSON ¶
func (d *Dictionary[K, V]) MarshalJSON() ([]byte, error)
func (*Dictionary[K, V]) Remove ¶
func (d *Dictionary[K, V]) Remove(key K) bool
func (*Dictionary[K, V]) Set ¶
func (d *Dictionary[K, V]) Set(key K, value V)
func (*Dictionary[K, V]) String ¶
func (d *Dictionary[K, V]) String() string
func (*Dictionary[K, V]) UnmarshalJSON ¶
func (d *Dictionary[K, V]) UnmarshalJSON(b []byte) error
func (*Dictionary[K, V]) Values ¶
func (d *Dictionary[K, V]) Values() []V
type IDictionary ¶
Click to show internal directories.
Click to hide internal directories.