set

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 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 Set

type Set[T any] struct {
	// contains filtered or unexported fields
}

func GenerateNewSet

func GenerateNewSet[T any](slice []interface{}, f func(interface{}) *T) (*Set[T], error)

func NewSet

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

func (*Set[T]) Add

func (_self *Set[T]) Add(t *T) bool

func (*Set[T]) Clear

func (_self *Set[T]) Clear()

func (*Set[T]) Contains

func (_self *Set[T]) Contains(t *T) bool

func (*Set[T]) IsEmpty

func (_self *Set[T]) IsEmpty() bool

func (*Set[T]) Merge

func (_self *Set[T]) Merge(other *Set[T])

func (*Set[T]) Range

func (_self *Set[T]) Range(f func(*T) bool)

func (*Set[T]) Remove

func (_self *Set[T]) Remove(t *T)

func (*Set[T]) Size

func (_self *Set[T]) Size() int

Jump to

Keyboard shortcuts

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