set

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 4 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] map[T]bool

func Of

func Of[T comparable](elements ...T) Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(element T) *Set[T]

func (*Set[T]) Clear

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

func (Set[T]) Copy

func (s Set[T]) Copy() Set[T]

func (Set[T]) Difference

func (s Set[T]) Difference(another Set[T]) Set[T]

func (*Set[T]) Discard

func (s *Set[T]) Discard(element T) bool

func (Set[T]) Empty

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

func (Set[T]) Equal

func (s Set[T]) Equal(another Set[T]) bool

func (Set[T]) Has

func (s Set[T]) Has(element T) bool

func (Set[T]) Intersection

func (s Set[T]) Intersection(another Set[T]) Set[T]

func (Set[T]) IsDisjoint

func (s Set[T]) IsDisjoint(another Set[T]) bool

func (Set[T]) IsSubset

func (s Set[T]) IsSubset(another Set[T]) bool

func (Set[T]) IsSuperset

func (s Set[T]) IsSuperset(another Set[T]) bool

func (Set[T]) MarshalJSON

func (s Set[T]) MarshalJSON() ([]byte, error)

func (*Set[T]) Pop

func (s *Set[T]) Pop() (element T, err error)

func (Set[T]) Size

func (s Set[T]) Size() int

func (Set[T]) String

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

func (Set[T]) SymmetricDifference

func (s Set[T]) SymmetricDifference(another Set[T]) Set[T]

func (Set[T]) Union

func (s Set[T]) Union(another Set[T]) Set[T]

func (*Set[T]) UnmarshalJSON

func (s *Set[T]) UnmarshalJSON(data []byte) (err error)

func (*Set[T]) Update

func (s *Set[T]) Update(another Set[T]) *Set[T]

Jump to

Keyboard shortcuts

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