dictionary

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From[TKey comparable, TValue any](e collections.Enumerator[collections.Tuple2[TKey, TValue]], capacity ...int) collections.Dictionary[TKey, TValue]

From creates a new dictionary with unsorted keys populated with key/value pairs from the given tuple enumerator.

func New

func New[TKey comparable, TValue any](capacity ...int) collections.Dictionary[TKey, TValue]

New creates a new dictionary with unsorted keys.

The keys will be returned in random order when enumeration and may have different orders per enumeration.

If one capacity value is given, an empty underlying map is allocated with enough space to hold the specified number of elements. The capacity may be omitted, in which case a small starting size is allocated.

func With

func With[TKey comparable, TValue any](m map[TKey]TValue) collections.Dictionary[TKey, TValue]

With creates a new dictionary with unsorted keys populated with key/value pairs from the given map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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