sortedmap

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitCapa = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

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

type SortedMap

type SortedMap []Item

func Add

func Add(ss SortedMap, key string, value interface{}) SortedMap

func Delete

func Delete(ss SortedMap, key string) (SortedMap, bool)

func DeleteIgnoreCase

func DeleteIgnoreCase(ss SortedMap, key string) (SortedMap, string, bool)

func Merge

func Merge(a, b SortedMap) SortedMap

order matters, values of the latter override the former

func NewSortedMap

func NewSortedMap() SortedMap

func NewSortedMapFromMap

func NewSortedMapFromMap(omap map[string]interface{}) SortedMap

func NewSortedMapFromMapWithCapa

func NewSortedMapFromMapWithCapa(omap map[string]interface{}, capa int) SortedMap

func NewSortedMapWithCapa

func NewSortedMapWithCapa(capa int) SortedMap

func Split

func Split(a, b SortedMap) (a_b, anbA, anbB, b_a SortedMap)

func (SortedMap) Contains

func (ss SortedMap) Contains(needle string) bool

func (SortedMap) ContainsAll

func (ss SortedMap) ContainsAll(needles ...string) bool

func (SortedMap) ContainsAny

func (ss SortedMap) ContainsAny(needles ...string) bool

func (SortedMap) Get

func (ss SortedMap) Get(key string) (interface{}, bool)

func (SortedMap) GetIgnoreCase

func (ss SortedMap) GetIgnoreCase(key string) (interface{}, string, bool)

func (SortedMap) Keys

func (ss SortedMap) Keys() []string

type SortedMapIterator

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

func NewIterator

func NewIterator(smap SortedMap) *SortedMapIterator

func (SortedMapIterator) Get

func (i SortedMapIterator) Get() (string, interface{})

func (SortedMapIterator) HasMore

func (i SortedMapIterator) HasMore() bool

func (*SortedMapIterator) Init

func (i *SortedMapIterator) Init(smap SortedMap)

func (*SortedMapIterator) Next

func (i *SortedMapIterator) Next()

Jump to

Keyboard shortcuts

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