Documentation ¶
Index ¶
- type Array
- type ArrayElemType
- type Entry
- type OrderedSet
- type OrderedSetElemType
- type SortedMap
- func (sm *SortedMap) Append(key string, value any)
- func (sm *SortedMap) Get(key string) (any, bool)
- func (sm *SortedMap) Len() int
- func (sm *SortedMap) Less(i, j int) bool
- func (sm *SortedMap) Remove(key string)
- func (sm *SortedMap) Set(key string, value any) (any, bool)
- func (sm *SortedMap) Swap(i, j int)
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array[T ArrayElemType] interface { // RemoveDuplicates 去重 RemoveDuplicates() // Array 返回实例 Array() []T // Join 逗号分隔(默认是逗号分隔) Join(sep string) string }
Array 列表
func NewArray ¶
func NewArray[T ArrayElemType]() Array[T]
func NewFromArray ¶
func NewFromArray[T ArrayElemType](arr []T) Array[T]
type ArrayElemType ¶
type OrderedSet ¶
type OrderedSet[T OrderedSetElemType] interface { Exist(target T) bool AddOne(elem T) Add(elems ...T) Len() int Cap() int AllElements() []T }
OrderedSet 有序集合
func NewOrderedSet ¶
func NewOrderedSet[T OrderedSetElemType]() OrderedSet[T]
func NewOrderedSetWithCap ¶
func NewOrderedSetWithCap[T OrderedSetElemType](cap int) OrderedSet[T]
type OrderedSetElemType ¶
Click to show internal directories.
Click to hide internal directories.