mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
泛型
This commit is contained in:
11
collections/generics/map.go
Normal file
11
collections/generics/map.go
Normal file
@ -0,0 +1,11 @@
|
||||
package generics
|
||||
|
||||
type Map[K comparable, V any] interface {
|
||||
Set(key K, value V)
|
||||
Get(key K) (V, bool)
|
||||
Delete(key K)
|
||||
ForEach(f func(K, V))
|
||||
Clone() Map[K, V]
|
||||
Clear()
|
||||
Count() int
|
||||
}
|
Reference in New Issue
Block a user