set

package
v0.0.0-...-43d03be Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITEM

type ITEM interface{}

generic

type Set

type Set map[ITEM]struct{}

Set represents a simple set

func (*Set) Add

func (i *Set) Add(a ITEM)

Add adds a item to the set

func (*Set) AddAll

func (i *Set) AddAll(a Set)

AddAll adds a other set to this set

func (Set) Has

func (i Set) Has(a ITEM) bool

Has checks if this set contains the item

func (Set) Items

func (i Set) Items() (res []ITEM)

Items returns the set items as a slice

func (Set) String

func (i Set) String() string

String satisfies the fmt.Stringer interface

type SetInt

type SetInt map[int]struct{}

func (*SetInt) Add

func (i *SetInt) Add(a int)

func (*SetInt) AddAll

func (i *SetInt) AddAll(a SetInt)

func (SetInt) Has

func (i SetInt) Has(a int) bool

func (SetInt) Items

func (i SetInt) Items() (res []int)

func (SetInt) String

func (i SetInt) String() string

Jump to

Keyboard shortcuts

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