set

package
v0.0.0-...-2e3374b Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

func New

func New() *Set

New creates and returns a reference to an empty set.

func (*Set) Add

func (s *Set) Add(items ...interface{})

Add adds the specified items to the set.

func (*Set) AllExists

func (s *Set) AllExists(items ...interface{}) bool

AllExists tests the specified items for membership in the set. Returns true if all items are members of the set, false otherwise.

func (*Set) Clear

func (s *Set) Clear()

Clear removes all items from the set.

func (*Set) Delete

func (s *Set) Delete(items ...interface{})

Delete removes the specified items from the set.

func (*Set) Exists

func (s *Set) Exists(item interface{}) bool

Exists tests the specified items for membership in the set. Returns true if all items are members of the set, false otherwise.

func (*Set) Len

func (s *Set) Len() int

Len returns the number of items in the set.

func (*Set) ToList

func (s *Set) ToList() []interface{}

ToList returns the members of the set as a slice.

Jump to

Keyboard shortcuts

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