dict

package
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dict

type Dict[K comparable, V any] underlyingmap[K, V]

func (Dict[K, V]) Get

func (d Dict[K, V]) Get(k K) (v V, ok bool)

func (Dict[K, V]) IsEmpty

func (d Dict[K, V]) IsEmpty() bool

func (Dict[K, V]) Len

func (d Dict[K, V]) Len() int

func (Dict[K, V]) Set

func (d Dict[K, V]) Set(k K, v V)

func (Dict[K, V]) String

func (m Dict[K, V]) String() string

type GetSetter

type GetSetter[K comparable, V any] interface {
	Get(key K) (value V)
	Set(key K, value V)
}

type Lister

type Lister[K comparable, V any] interface {
	Keys() []K
	Values() []V
}

type Mapper

type Mapper[K comparable, V any] interface {
	GetSetter[K, V]
	Stringer[K, V]
	Lookup(key K) (value V, ok bool)
}

type Sorter

type Sorter[K comparable, V any] interface {
	sort.Interface
	Len() int
	Less(i, j int) bool
	Swap(i, j int)
}

type Stringer

type Stringer[K comparable, V any] interface {
	String() string
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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