Documentation ¶
Index ¶
- type AscIter
- type DescIter
- type Dictionary
- func (d *Dictionary[T]) Ascend() *AscIter[T]
- func (d *Dictionary[T]) Back() *Iterator[T]
- func (d *Dictionary[T]) Delete(key string)
- func (d *Dictionary[T]) Descend() *DescIter[T]
- func (d *Dictionary[T]) Front() *Iterator[T]
- func (d *Dictionary[T]) Get(key string) (val T, ok bool)
- func (d *Dictionary[T]) Len() int
- func (d *Dictionary[T]) Load(key string) (val T, ok bool)
- func (d *Dictionary[T]) Range(f func(string, T) bool)
- func (d *Dictionary[T]) Set(key string, val T)
- func (d *Dictionary[T]) Store(key string, val T)
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary[T any] struct { // contains filtered or unexported fields }
func MapToDictionary ¶
func MapToDictionary[T any](source map[string]T) *Dictionary[T]
func (*Dictionary[T]) Ascend ¶
func (d *Dictionary[T]) Ascend() *AscIter[T]
func (*Dictionary[T]) Back ¶
func (d *Dictionary[T]) Back() *Iterator[T]
func (*Dictionary[T]) Delete ¶
func (d *Dictionary[T]) Delete(key string)
func (*Dictionary[T]) Descend ¶
func (d *Dictionary[T]) Descend() *DescIter[T]
func (*Dictionary[T]) Front ¶
func (d *Dictionary[T]) Front() *Iterator[T]
func (*Dictionary[T]) Get ¶
func (d *Dictionary[T]) Get(key string) (val T, ok bool)
func (*Dictionary[T]) Len ¶
func (d *Dictionary[T]) Len() int
func (*Dictionary[T]) Load ¶
func (d *Dictionary[T]) Load(key string) (val T, ok bool)
Load is same as Get that is a compatible method with "sync".Map
func (*Dictionary[T]) Range ¶
func (d *Dictionary[T]) Range(f func(string, T) bool)
func (*Dictionary[T]) Set ¶
func (d *Dictionary[T]) Set(key string, val T)
func (*Dictionary[T]) Store ¶
func (d *Dictionary[T]) Store(key string, val T)
Store is same as Set that is a compatible method with "sync".Map
Click to show internal directories.
Click to hide internal directories.