Back to godoc.org
go.bmvs.io/orderedset

Package orderedset

v1.0.2
Latest Go to latest

The highest tagged major version is .

Published: Jul 31, 2019 | License: BSD-2-Clause | Module: go.bmvs.io/orderedset

Overview

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

Index

type OrderedSet

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

OrderedSet insertion ordered Set implementation

func New

func New() *OrderedSet

New return a new Set implemented by OrderedSet

func (*OrderedSet) Add

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

Add add items to the OrderedSet

func (*OrderedSet) Contains

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

Contains return if OrderedSet contains the specified items or not

func (*OrderedSet) Empty

func (s *OrderedSet) Empty() bool

Empty return if the OrderedSet in empty or not

func (*OrderedSet) Remove

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

Remove remove items from the OrderedSet

func (*OrderedSet) Size

func (s *OrderedSet) Size() int

Size return the size of the OrderedSet

func (*OrderedSet) Values

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

Values return the values of the OrderedSet in insertion order

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier