package
Version:
v1.0.29
Opens a new window with list of versions in this module.
Published: Oct 27, 2016
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Set is an implementation of ISet using the builtin map type. Set is threadsafe.
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 *Set) Add(items ...interface{})
Add will add the provided items to the set.
func (set *Set) All(items ...interface{}) bool
All returns a bool indicating if all of the supplied items exist in the set.
Clear will remove all items from the set.
func (set *Set) Dispose()
Dispose will add this set back into the pool.
func (set *Set) Exists(item interface{}) bool
Exists returns a bool indicating if the given item exists in the set.
func (set *Set) Flatten() []interface{}
Flatten will return a list of the items in the set.
Len returns the number of items in the set.
func (set *Set) Remove(items ...interface{})
Remove will remove the given items from the set.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.