set

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractSet

type AbstractSet[T comparable] struct {
	// contains filtered or unexported fields
}

func (*AbstractSet[T]) Add

func (s *AbstractSet[T]) Add(value T)

func (*AbstractSet[T]) Contains

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

func (*AbstractSet[T]) Copy

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

func (*AbstractSet[T]) Difference

func (s *AbstractSet[T]) Difference(other Set[T]) Set[T]

func (*AbstractSet[T]) Intersection

func (s *AbstractSet[T]) Intersection(other Set[T]) Set[T]

func (*AbstractSet[T]) IsSubset

func (s *AbstractSet[T]) IsSubset(other Set[T]) bool

func (*AbstractSet[T]) IsSubsetOf

func (s *AbstractSet[T]) IsSubsetOf(other Set[T]) bool

func (*AbstractSet[T]) IsSuperset

func (s *AbstractSet[T]) IsSuperset(other Set[T]) bool

func (*AbstractSet[T]) IsSupersetOf

func (s *AbstractSet[T]) IsSupersetOf(other Set[T]) bool

func (*AbstractSet[T]) Remove

func (s *AbstractSet[T]) Remove(value T)

func (*AbstractSet[T]) SymmetricDifference

func (s *AbstractSet[T]) SymmetricDifference(other Set[T]) Set[T]

func (*AbstractSet[T]) Union

func (s *AbstractSet[T]) Union(other Set[T]) Set[T]

func (*AbstractSet[T]) Values

func (s *AbstractSet[T]) Values() []T

type Set

type Set[T comparable] interface {
	Add(value T)
	Values() []T
	Contains(value T) bool
	Remove(value T)
	Union(other Set[T]) Set[T]
	Intersection(other Set[T]) Set[T]
	Difference(other Set[T]) Set[T]
	SymmetricDifference(other Set[T]) Set[T]
	IsSubsetOf(other Set[T]) bool
	IsSupersetOf(other Set[T]) bool
	Copy() Set[T]
}

func NewSet

func NewSet[T comparable]() Set[T]

func NewSetWithValues

func NewSetWithValues[T comparable](init *[]T) Set[T]

Jump to

Keyboard shortcuts

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