hashset

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: BSD-2-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Instantiates a new empty set

func (*Set) Add

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

Adds the items (one or more) to the set.

func (*Set) Clear

func (set *Set) Clear()

Clears all values in the set.

func (*Set) Contains

func (set *Set) Contains(items ...interface{}) bool

Check if items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.

func (*Set) Empty

func (set *Set) Empty() bool

Returns true if set does not contain any elements.

func (*Set) Remove

func (set *Set) Remove(items ...interface{})

Removes the items (one or more) from the set.

func (*Set) Size

func (set *Set) Size() int

Returns number of elements within the set.

func (*Set) String

func (set *Set) String() string

func (*Set) Values

func (set *Set) Values() []interface{}

Returns all items in the set.

Jump to

Keyboard shortcuts

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