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

Package orderedmap

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/orderedmap

Overview

Package orderedmap implements a thread safe insertion ordered map.

Index

type OrderedMap

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

OrderedMap insertion ordered Map implementation

func New

func New() *OrderedMap

New return a new Map implemented by OrderedMap

func (*OrderedMap) Empty

func (m *OrderedMap) Empty() bool

Empty return if the OrderedMap in empty or not

func (*OrderedMap) Get

func (m *OrderedMap) Get(key interface{}) (value interface{}, found bool)

Get return the value of a key from the OrderedMap

func (*OrderedMap) Keys

func (m *OrderedMap) Keys() []interface{}

Keys return the keys of the OrderedMap in insertion order

func (*OrderedMap) Put

func (m *OrderedMap) Put(key, value interface{})

Put add a key-value pair to the OrderedMap

func (*OrderedMap) Remove

func (m *OrderedMap) Remove(key interface{})

Remove remove a key-value pair from the OrderedMap

func (*OrderedMap) Size

func (m *OrderedMap) Size() int

Size return the size of the OrderedMap

func (*OrderedMap) Values

func (m *OrderedMap) Values() []interface{}

Values return the values of the OrderedMap 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