orderedset: go.bmvs.io/orderedset Index | Files

package orderedset

import "go.bmvs.io/orderedset"

Package orderedset implements a thread safe insertion ordered set backed by an ordered map.

Index

Package Files

orderedset.go

type OrderedSet Uses

type OrderedSet struct {
    sync.Mutex
    // contains filtered or unexported fields
}

OrderedSet insertion ordered Set implementation

func New Uses

func New() *OrderedSet

New return a new Set implemented by OrderedSet

func (*OrderedSet) Add Uses

func (s *OrderedSet) Add(items ...interface{})

Add add items to the OrderedSet

func (*OrderedSet) Contains Uses

func (s *OrderedSet) Contains(items ...interface{}) bool

Contains return if OrderedSet contains the specified items or not

func (*OrderedSet) Empty Uses

func (s *OrderedSet) Empty() bool

Empty return if the OrderedSet in empty or not

func (*OrderedSet) Remove Uses

func (s *OrderedSet) Remove(items ...interface{})

Remove remove items from the OrderedSet

func (*OrderedSet) Size Uses

func (s *OrderedSet) Size() int

Size return the size of the OrderedSet

func (*OrderedSet) Values Uses

func (s *OrderedSet) Values() []interface{}

Values return the values of the OrderedSet in insertion order

Package orderedset imports 2 packages (graph). Updated 2018-09-21. Refresh now. Tools for package owners.