collections: github.com/golang-collections/collections/set Index | Files

package set

import "github.com/golang-collections/collections/set"

Index

Package Files

set.go

type Set Uses

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

func New Uses

func New(initial ...interface{}) *Set

Create a new set

func (*Set) Difference Uses

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

Find the difference between two sets

func (*Set) Do Uses

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

Call f for each item in the set

func (*Set) Has Uses

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

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

func (*Set) Insert Uses

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

Add an element to the set

func (*Set) Intersection Uses

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

Find the intersection of two sets

func (*Set) Len Uses

func (this *Set) Len() int

Return the number of items in the set

func (*Set) ProperSubsetOf Uses

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

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

func (*Set) Remove Uses

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

Remove an element from the set

func (*Set) SubsetOf Uses

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

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

func (*Set) Union Uses

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

Find the union of two sets

Package set is imported by 1 packages. Updated 2019-10-07. Refresh now. Tools for package owners.