set

package
v0.0.0-rc10 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 3 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 comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](values ...T) *Set[T]

func (*Set[T]) Add

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

func (*Set[T]) Contains

func (s *Set[T]) Contains(value T) bool

func (*Set[T]) Empty

func (s *Set[T]) Empty() bool

func (*Set[T]) Equals

func (s *Set[T]) Equals(o *Set[T]) bool

func (*Set[T]) Len

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

func (*Set[T]) Range

func (s *Set[T]) Range(callback func(value T))

func (*Set[T]) Remove

func (s *Set[T]) Remove(values ...T)

func (*Set[T]) Slice

func (s *Set[T]) Slice() []T

func (*Set[T]) SortedSliceFunc

func (s *Set[T]) SortedSliceFunc(less func(a, b T) bool) []T

func (*Set[T]) String

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

func (*Set[T]) Without

func (s *Set[T]) Without(toExclude *Set[T]) []T

Without returns slice representing elements of current Set without elements of input.

Jump to

Keyboard shortcuts

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