set

package
v0.0.0-...-604e922 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2013 License: MIT Imports: 0 Imported by: 85

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(initial ...interface{}) *Set

Create a new set

func (*Set) Difference

func (this *Set) Difference(set *Set) *Set

Find the difference between two sets

func (*Set) Do

func (this *Set) Do(f func(interface{}))

Call f for each item in the set

func (*Set) Has

func (this *Set) Has(element interface{}) bool

Test to see whether or not the element is in the set

func (*Set) Insert

func (this *Set) Insert(element interface{})

Add an element to the set

func (*Set) Intersection

func (this *Set) Intersection(set *Set) *Set

Find the intersection of two sets

func (*Set) Len

func (this *Set) Len() int

Return the number of items in the set

func (*Set) ProperSubsetOf

func (this *Set) ProperSubsetOf(set *Set) bool

Test whether or not this set is a proper subset of "set"

func (*Set) Remove

func (this *Set) Remove(element interface{})

Remove an element from the set

func (*Set) SubsetOf

func (this *Set) SubsetOf(set *Set) bool

Test whether or not this set is a subset of "set"

func (*Set) Union

func (this *Set) Union(set *Set) *Set

Find the union of two sets

Jump to

Keyboard shortcuts

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