hashset

package
v0.0.0-...-118d4d9 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2016 License: BSD-2-Clause Imports: 3 Imported by: 0

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