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

package orderedmap

import "go.bmvs.io/orderedmap"

Package orderedmap implements a thread safe insertion ordered map.

Index

Package Files

orderedmap.go

type OrderedMap Uses

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

OrderedMap insertion ordered Map implementation

func New Uses

func New() *OrderedMap

New return a new Map implemented by OrderedMap

func (*OrderedMap) Empty Uses

func (m *OrderedMap) Empty() bool

Empty return if the OrderedMap in empty or not

func (*OrderedMap) Get Uses

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

Get return the value of a key from the OrderedMap

func (*OrderedMap) Keys Uses

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

Keys return the keys of the OrderedMap in insertion order

func (*OrderedMap) Put Uses

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

Put add a key-value pair to the OrderedMap

func (*OrderedMap) Remove Uses

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

Remove remove a key-value pair from the OrderedMap

func (*OrderedMap) Size Uses

func (m *OrderedMap) Size() int

Size return the size of the OrderedMap

func (*OrderedMap) Values Uses

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

Values return the values of the OrderedMap in insertion order

Package orderedmap imports 1 packages (graph) and is imported by 1 packages. Updated 2018-10-06. Refresh now. Tools for package owners.