Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary[K any, V any] interface { // Get returns the value associated with the given key. Get(key K) (V, bool) // Set sets the value associated with the given key. Set(key K, value V) // Remove removes the value associated with the given key. Remove(key K) // Keys returns the keys of the map. Keys() []K // Values returns the values of the map. Values() []V // Size returns the number of elements in the map. Size() int // IsEmpty returns true if the map is empty. IsEmpty() bool // Clear removes all elements from the map. Clear() Iterator() iterable.Iterator[pair[K, V]] }
Dictionary is a map for use when you don't have a natively hashable type
func NewConcurrentUnordered ¶ added in v0.3.0
func NewConcurrentUnordered[K Hashable, V any]() Dictionary[K, V]
func NewConcurrentUnorderedSize ¶ added in v0.3.0
func NewConcurrentUnorderedSize[K Hashable, V any](size int) Dictionary[K, V]
func NewUnordered ¶
func NewUnordered[K Hashable, V any]() Dictionary[K, V]
func NewUnorderedSize ¶
func NewUnorderedSize[K Hashable, V any](size int) Dictionary[K, V]
Click to show internal directories.
Click to hide internal directories.