set

package
v0.0.0-...-630fae4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2015 License: Apache-2.0 Imports: 1 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
}

Set is an implementation of ISet using the builtin map type. Set is threadsafe.

func New

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

New is the constructor for sets. It will pull from a reuseable memory pool if it can. Takes a list of items to initialize the set with.

func (*Set) Add

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

Add will add the provided items to the set.

func (*Set) All

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

All returns a bool indicating if all of the supplied items exist in the set.

func (*Set) Clear

func (set *Set) Clear()

Clear will remove all items from the set.

func (*Set) Dispose

func (set *Set) Dispose()

Dispose will add this set back into the pool.

func (*Set) Exists

func (set *Set) Exists(item interface{}) bool

Exists returns a bool indicating if the given item exists in the set.

func (*Set) Flatten

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

Flatten will return a list of the items in the set.

func (*Set) Len

func (set *Set) Len() int64

Len returns the number of items in the set.

func (*Set) Remove

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

Remove will remove the given items from the set.

Jump to

Keyboard shortcuts

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