intlinkedhashmap

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Portions of this file are based on Apache Commons Collections, licensed under the Apache License, Version 2.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefault

func NewDefault[K orderedmap.Integer, V any]() orderedmap.Map[K, V]

NewDefault creates a new IntLinkedHashMap with default capacity and load factor. It supports generic integer keys (K) and values of any type (V). Useful for quick initialization when defaults are sufficient.

Returns:

  • a new Map[K,V] instance.

Types

type IntLinkedHashMap

type IntLinkedHashMap[K orderedmap.Integer, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K orderedmap.Integer, V any](capacity int, loadFactor float64) *IntLinkedHashMap[K, V]

New creates a new IntLinkedHashMap with the specified initial capacity and load factor. It supports generic integer keys (K) and values of any type (V). The map preserves insertion order.

Parameters:

  • capacity: initial size of the map; use DefaultCapacity if unsure.
  • loadFactor: determines when the map should resize; typically 0.75.

Returns:

  • a new Map[K,V] instance.

func (*IntLinkedHashMap[K, V]) Clear

func (m *IntLinkedHashMap[K, V]) Clear()

func (*IntLinkedHashMap[K, V]) Clone

func (m *IntLinkedHashMap[K, V]) Clone() orderedmap.Map[K, V]

func (*IntLinkedHashMap[K, V]) ContainsKey

func (m *IntLinkedHashMap[K, V]) ContainsKey(key K) bool

func (*IntLinkedHashMap[K, V]) Delete

func (m *IntLinkedHashMap[K, V]) Delete(key K) (V, bool)

func (*IntLinkedHashMap[K, V]) Get

func (m *IntLinkedHashMap[K, V]) Get(key K) (V, bool)

func (*IntLinkedHashMap[K, V]) IsEmpty

func (m *IntLinkedHashMap[K, V]) IsEmpty() bool

func (*IntLinkedHashMap[K, V]) Items

func (m *IntLinkedHashMap[K, V]) Items() iter.Seq2[K, V]

func (*IntLinkedHashMap[K, V]) Keys

func (m *IntLinkedHashMap[K, V]) Keys() iter.Seq[K]

func (*IntLinkedHashMap[K, V]) Put

func (m *IntLinkedHashMap[K, V]) Put(key K, value V) (V, bool)

func (*IntLinkedHashMap[K, V]) Size

func (m *IntLinkedHashMap[K, V]) Size() int

func (*IntLinkedHashMap[K, V]) String

func (m *IntLinkedHashMap[K, V]) String() string

func (*IntLinkedHashMap[K, V]) Values

func (m *IntLinkedHashMap[K, V]) Values() iter.Seq[V]

Jump to

Keyboard shortcuts

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