set

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 0 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 interface {

	// Add element to set
	Add(e interface{}) bool
	// Remove remove element to set
	Remove(e interface{})
	// Contains Judge whether the set contains the specified elements, if anyone does not contain, return false, otherwise return true
	Contains(e ...interface{}) bool
	// Clear remove all from set
	Clear()
	// Len return the number of element
	Len() int
}

Set defined set func, Set is used to store a collection of unique elements.

func NewSet

func NewSet(e ...interface{}) Set

NewSet Initialize a set

Jump to

Keyboard shortcuts

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