sortedmap

package
v0.0.0-...-65ee0f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKVExpression = errors.New(`invalid key-value expression`)
	ErrInvalidKVS          = errors.New("the length of kv must be a even number")
)

Functions

This section is empty.

Types

type KV

type KV []interface{}

type SortedMap

type SortedMap struct {
	// contains filtered or unexported fields
}

func New

func New() *SortedMap

func (*SortedMap) Copy

func (m *SortedMap) Copy() *SortedMap

func (*SortedMap) Format

func (m *SortedMap) Format() []string

func (*SortedMap) Get

func (m *SortedMap) Get(key interface{}) (interface{}, bool)

func (*SortedMap) GetOr

func (m *SortedMap) GetOr(key, dft interface{}) interface{}

func (*SortedMap) GetString

func (m *SortedMap) GetString(key interface{}) (string, bool)

func (*SortedMap) GetStringOr

func (m *SortedMap) GetStringOr(key interface{}, dft string) string

func (*SortedMap) HasKey

func (m *SortedMap) HasKey(key interface{}) bool

func (*SortedMap) HasValue

func (m *SortedMap) HasValue(value interface{}) bool

func (*SortedMap) Insert

func (m *SortedMap) Insert(sm *SortedMap)

func (*SortedMap) Keys

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

func (*SortedMap) Range

func (m *SortedMap) Range(iterator func(key, value interface{}))

func (*SortedMap) RangeIf

func (m *SortedMap) RangeIf(iterator func(key, value interface{}) bool)

func (*SortedMap) Remove

func (m *SortedMap) Remove(key interface{}) (value interface{}, ok bool)

func (*SortedMap) Reset

func (m *SortedMap) Reset()

func (*SortedMap) Set

func (m *SortedMap) Set(kv KV) error

func (*SortedMap) SetExpression

func (m *SortedMap) SetExpression(expression string) (key, value interface{}, err error)

func (*SortedMap) SetKV

func (m *SortedMap) SetKV(key, value interface{})

func (*SortedMap) Values

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL