set

package
v0.0.0-...-34fed76 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImmutableSet

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

func NewImmutable

func NewImmutable[T comparable](items ...T) *ImmutableSet[T]

func (*ImmutableSet[T]) Add

func (s *ImmutableSet[T]) Add(e T) *ImmutableSet[T]

func (*ImmutableSet[T]) AddRange

func (s *ImmutableSet[T]) AddRange(e ...T) *ImmutableSet[T]

func (*ImmutableSet[T]) Clone

func (s *ImmutableSet[T]) Clone() *ImmutableSet[T]

func (*ImmutableSet[T]) Contains

func (s *ImmutableSet[T]) Contains(e T) bool

func (*ImmutableSet[T]) Equals

func (s *ImmutableSet[T]) Equals(other Set[T]) bool

func (*ImmutableSet[T]) Except

func (s *ImmutableSet[T]) Except(other Set[T]) *ImmutableSet[T]

func (*ImmutableSet[T]) ImmutableSet

func (s *ImmutableSet[T]) ImmutableSet(other Set[T]) bool

func (*ImmutableSet[T]) Intersect

func (s *ImmutableSet[T]) Intersect(other Set[T]) *ImmutableSet[T]

func (*ImmutableSet[T]) IsEmpty

func (s *ImmutableSet[T]) IsEmpty() bool

func (*ImmutableSet[T]) IsProperSubset

func (s *ImmutableSet[T]) IsProperSubset(other Set[T]) bool

func (*ImmutableSet[T]) IsProperSuperset

func (s *ImmutableSet[T]) IsProperSuperset(other Set[T]) bool

func (*ImmutableSet[T]) IsSubset

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

func (*ImmutableSet[T]) IsSuperset

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

func (*ImmutableSet[T]) Remove

func (s *ImmutableSet[T]) Remove(e T) *ImmutableSet[T]

func (*ImmutableSet[T]) Size

func (s *ImmutableSet[T]) Size() int

func (*ImmutableSet[T]) String

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

func (*ImmutableSet[T]) ToSlice

func (s *ImmutableSet[T]) ToSlice() []T

func (*ImmutableSet[T]) Union

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

type MutableSet

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

func New

func New[T comparable](items ...T) *MutableSet[T]

func (*MutableSet[T]) Add

func (s *MutableSet[T]) Add(e T)

func (*MutableSet[T]) AddRange

func (s *MutableSet[T]) AddRange(e ...T)

func (*MutableSet[T]) Clear

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

func (*MutableSet[T]) Clone

func (s *MutableSet[T]) Clone() *MutableSet[T]

func (*MutableSet[T]) Contains

func (s *MutableSet[T]) Contains(e T) bool

func (*MutableSet[T]) Equals

func (s *MutableSet[T]) Equals(other Set[T]) bool

func (*MutableSet[T]) Except

func (s *MutableSet[T]) Except(other Set[T]) *MutableSet[T]

func (*MutableSet[T]) Intersect

func (s *MutableSet[T]) Intersect(other Set[T]) *MutableSet[T]

func (*MutableSet[T]) IsEmpty

func (s *MutableSet[T]) IsEmpty() bool

func (*MutableSet[T]) IsProperSubset

func (s *MutableSet[T]) IsProperSubset(other Set[T]) bool

func (*MutableSet[T]) IsProperSuperset

func (s *MutableSet[T]) IsProperSuperset(other Set[T]) bool

func (*MutableSet[T]) IsSubset

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

func (*MutableSet[T]) IsSuperset

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

func (*MutableSet[T]) Remove

func (s *MutableSet[T]) Remove(e T)

func (*MutableSet[T]) Size

func (s *MutableSet[T]) Size() int

func (*MutableSet[T]) String

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

func (*MutableSet[T]) ToSlice

func (s *MutableSet[T]) ToSlice() []T

func (*MutableSet[T]) TryAdd

func (s *MutableSet[T]) TryAdd(e T) bool

func (*MutableSet[T]) TryRemove

func (s *MutableSet[T]) TryRemove(e T) bool

func (*MutableSet[T]) Union

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

type Set

type Set[T comparable] interface {
	Contains(e T) bool
	Size() int
	IsEmpty() bool
	ToSlice() []T
	IsSubset(other Set[T]) bool
	IsSuperset(other Set[T]) bool
	IsProperSuperset(other Set[T]) bool
	IsProperSubset(other Set[T]) bool
	Equals(other Set[T]) bool
	String() string
}

Jump to

Keyboard shortcuts

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