Documentation ¶
Index ¶
- Constants
- type Config
- type KeyOrder
- type LinkedHashMap
- func (hm *LinkedHashMap[K, V]) All() iter.Seq2[K, V]
- func (hm *LinkedHashMap[K, V]) Empty() bool
- func (hm *LinkedHashMap[K, V]) Get(key K) (V, bool)
- func (hm *LinkedHashMap[K, V]) Keys() iter.Seq[K]
- func (hm *LinkedHashMap[K, V]) Put(key K, value V)
- func (hm *LinkedHashMap[K, V]) Remove(key K)
- func (hm *LinkedHashMap[K, V]) Size() int
- func (hm *LinkedHashMap[K, V]) Values() iter.Seq[V]
- type Opt
Constants ¶
View Source
const ( InsertionOrder = false AccessOrder = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.