linkedhashmap

package
v0.0.0-...-823f058 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InsertionOrder = false
	AccessOrder    = true
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type KeyOrder

type KeyOrder bool

type LinkedHashMap

type LinkedHashMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K comparable, V any](opts ...Opt) *LinkedHashMap[K, V]

func (*LinkedHashMap[K, V]) All

func (hm *LinkedHashMap[K, V]) All() iter.Seq2[K, V]

func (*LinkedHashMap[K, V]) Empty

func (hm *LinkedHashMap[K, V]) Empty() bool

func (*LinkedHashMap[K, V]) Get

func (hm *LinkedHashMap[K, V]) Get(key K) (V, bool)

func (*LinkedHashMap[K, V]) Keys

func (hm *LinkedHashMap[K, V]) Keys() iter.Seq[K]

func (*LinkedHashMap[K, V]) Put

func (hm *LinkedHashMap[K, V]) Put(key K, value V)

func (*LinkedHashMap[K, V]) Remove

func (hm *LinkedHashMap[K, V]) Remove(key K)

func (*LinkedHashMap[K, V]) Size

func (hm *LinkedHashMap[K, V]) Size() int

func (*LinkedHashMap[K, V]) Values

func (hm *LinkedHashMap[K, V]) Values() iter.Seq[V]

type Opt

type Opt func(*Config)

func WithAccessOrder

func WithAccessOrder() Opt

func WithInsertionOrder

func WithInsertionOrder() Opt

func WithMaxElements

func WithMaxElements(max int) Opt

Jump to

Keyboard shortcuts

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