package
Version:
v0.0.0-...-7bb2ca5
Opens a new window with list of versions in this module.
Published: Nov 12, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Set 利用泛型,定义一个泛型类型(set), 泛型的写法使用中括号,comparable是新增的一个内置类型
func (s Set[T]) AddAll(vs ...T)
AddAll 向set中添加多个元素
func (s Set[T]) Clear() Set[T]
Clear 清空set
func (s Set[T]) Remove(v T)
Remove 移除set中某个元素
func (s Set[T]) RemoveAll(vs ...T)
RemoveAll 移除set中多个元素
func (s Set[T]) ToSlice() []T
ToSlice set转slice
Source Files
¶
Click to show internal directories.
Click to hide internal directories.