mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
map
This commit is contained in:
14
maps/map.go
Normal file
14
maps/map.go
Normal file
@ -0,0 +1,14 @@
|
||||
package maps
|
||||
|
||||
import "golang.org/x/exp/constraints"
|
||||
|
||||
type Map[K constraints.Ordered, V any] interface {
|
||||
Set(key K, value V)
|
||||
Get(key K) (value V, ok bool)
|
||||
Exist(key K) bool
|
||||
Delete(key K)
|
||||
Clone() Map[K, V]
|
||||
Clear()
|
||||
Count() int
|
||||
ForEach(f func(K, V))
|
||||
}
|
Reference in New Issue
Block a user