set

package
v2.0.26 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemFilterFunc added in v2.0.25

type ItemFilterFunc[T any] func(t T) bool

type ItemHandleFunc added in v2.0.24

type ItemHandleFunc[T any] func(t T)

type Set added in v2.0.24

type Set[T any] struct {
	Total int64 `json:"total"`
	Items []T   `json:"items"`
}

func New added in v2.0.24

func New[T any]() *Set[T]

构造函数

func (*Set[T]) Add added in v2.0.24

func (s *Set[T]) Add(items ...T)

func (Set[T]) Filter added in v2.0.25

func (s Set[T]) Filter(f ItemFilterFunc[T]) Set[T]

func (*Set[T]) ForEach added in v2.0.24

func (s *Set[T]) ForEach(h ItemHandleFunc[T])

func (*Set[T]) Len added in v2.0.24

func (s *Set[T]) Len() int

func (*Set[T]) String added in v2.0.25

func (s *Set[T]) String() string

Jump to

Keyboard shortcuts

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